Learn R Programming

inDAGO (version 1.0.0)

getDegMerged: getDegMerged

Description

Merge multiple DEG result CSVs with GTF annotations into a single data frame.

Usage

getDegMerged(path, gtfPath, columns, collapseName, typeFilter, selectUpDown)

Value

A combined data frame

Arguments

path

Character. Directory containing DEG result CSV files.

gtfPath

Character. Path to the GTF annotation file.

columns

Character vector. Names of annotation columns to include from the GTF.

collapseName

Logical. If TRUE, strip method/model prefixes from file names when prefixing columns.

typeFilter

Character. GTF feature type to filter (e.g., "gene" or "transcript").

selectUpDown

Logical. If TRUE, only include IDs with "diffExp" == UP or DOWN.

Details

This function reads all CSV files in a directory, validates presence of required columns ("ID", and optionally "diffExp"), filters for up/down regulated genes if requested, extracts annotation fields from a GTF, and returns a merged table of selected annotation columns alongside all DEG metrics (with optional file-based column prefixes).