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)

caOmicsV documentation built on Nov. 8, 2020, 8:23 p.m.