Order the input data frame using a specific column and annotates the top N features.

addStatusByRank(
  resDf,
  rankCol,
  topN,
  splitUpDown,
  decreasing = TRUE,
  absolute = TRUE,
  splitCol = "logFc",
  splitMidPoint = 0,
  noChangeLabel = "No change",
  statusCol = "status",
  upLabel = "Up",
  downLabel = "Down",
  sigLabel = "Significant"
)

Arguments

resDf

The data frame to annotate.

rankCol

The column used to order the data frame.

topN

The top N features to be annotated.

splitUpDown

Split annotation into up and down features? If TRUE, splitCol and splitMidPoint should be provided.

decreasing

Order rankCol decreasing?

absolute

Use absolute rankCol values?

splitCol

If splitUpDown = TRUE, the column used to split features into up and down.

splitMidPoint

If splitUpDown = TRUE, the splitCol value considered as midpoint.

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.

Value

The annotated data frame.