Adds a "status" column to a data frame using a specific cutoff.
addStatusByCutoff( resDf, splitUpDown, splitCol = "logFc", splitMidPoint = 0, metricCol = "logFc", metricCutoff = 1, sigCol = "pAdj", sigCutoff = 0.05, noChangeLabel = "No change", statusCol = "status", upLabel = "Up", downLabel = "Down", sigLabel = "Significant" )
resDf | The data frame to annotate. |
---|---|
splitUpDown | Split annotation into up and down features? If TRUE, splitCol and splitMidPoint should be provided. |
splitCol | If splitUpDown = TRUE, the column used to split features into up and down. |
splitMidPoint | If splitUpDown = TRUE, the splitCol value considered as midpoint. |
metricCol | Column containing a metric to stablish the cutoff. |
metricCutoff | The metric cutoff value. Rows with an absolute metricCol value above it will be annotated. |
sigCol | Column containing a significance value to stablish the cutoff. |
sigCutoff | The significance cutoff value. Rows with an sigCol value below it will be annotated. |
noChangeLabel | Label to be used in not annotated rows. |
statusCol | Name of the status column. |
upLabel | Label for up-regulated features. |
downLabel | Label for down-regulated features. |
sigLabel | Label for significant features. Only used if splitUpDown = FALSE. |
The annotated data frame.