Filters and plots DEG results for a given set of sample comparisons. The gene idenifiers of all (i) Up_or_Down, (ii) Up and (iii) Down regulated genes are stored as separate list components, while the corresponding summary statistics, stored in a fourth list component, is plotted in form of a stacked bar plot.
Usage
filterDEGs(degDF, filter, plot = TRUE)
Arguments
degDF
data.frame generated by run_edgeR
filter
Named vector with filter cutoffs of format c(Fold=2, FDR=1) where Fold refers to the fold change cutoff (unlogged) and FDR to the p-value cutoff.
plot
Allows to turn plotting behavior on and off with default set to TRUE.
Details
Currently, there is no community standard available how to calculate fold
changes (here logFC) of genomic ranges, such as gene or feature ranges, to
unambiguously refer to them as features with increased or decreased read
abundandce; or in case of gene expression experiments to up or down regulated
genes, respectively. To be consistent within systemPipeR, the
corresponding functions, such as filterDEGs, use here the following
definition. Genomic ranges with positive logFC values are classified as
up and those with negative logFC values as down. This means if a
comparison among two samples a and b is specified in the
corresponding targets file as a-b then the feature with a positive logFC
has a higher _normalized_ read count value in sample a than in sample
b, and vice versa. To inverse this assignment, users want to change the
specification of their chosen sample comparison(s) in the targets file
accordingly, e.g. change a-b to b-a. Alternatively, one can swap
the column order of the matrix assigned to the cmp argument of the
run_edgeR or run_DESeq2 functions. Users should also be aware
that for logFC values close to zero (noise range), the direction of the fold
change (sign of logFC) can be very sensitive to minor differences in the
normalization method, while this assignment is much more robust for more
pronounced changes or higher absolute logFC values.
Value
Returns list with four components
UporDown
List of up or down regulated gene/transcript indentifiers meeting the chosen filter settings for all comparisons defined in data frames pval and log2FC.
Up
Same as above but only for up regulated genes/transcript.
Down
Same as above but only for down regulated genes/transcript.