sortOmicsDataByRow: Sort Omics Data by Row

Description Usage Arguments Value Author(s) Examples

View source: R/caOmicsV.R

Description

Sort omics data by row (genes) in order to get omics data in a specific order, e.g., ordered by p values or by fold changes in expression data. After sorting, the order of row names in omics data will be same as the second argument.

Usage

1
    sortOmicsDataByRow(omicsData, geneNames)

Arguments

omicsData

a data frame that holds genomic data such as gene expression, SNV, RNASeq. The first column must be gene names that are same as the second argument except of order.

geneNames

character vector, gene names in a given order (such as by p values). Redundant gene names are allowed.

Value

omicsData

copy of the first argument with new row order.

Author(s)

Henry Zhang

Examples

1
2
3
4
    data(RNASeqDemoData)
    geneNames <- as.character(RNASeqDemoData[,1])
    geneNames <- geneNames[order(RNASeqDemoData[,2])]
    expr <- sortOmicsDataByRow(RNASeqDemoData, geneNames)

hzhanghenry/caOmicsV documentation built on May 17, 2019, 10:07 p.m.