sortOmicsDataByColumn: Sort Omics Data by Column Header

Description Usage Arguments Value Author(s) Examples

View source: R/caOmicsV.R

Description

Sort omics data by column header (sample names) based on the order of the second argument. The sample names in the first argument must have same items as the second argument except of order. After sorting, the sample names in omics data and the second argument will be in same order.

Usage

1
sortOmicsDataByColumn(omicsData, sampleNames)

Arguments

omicsData

A data frame that holds genomic data such as gene expression, SNV, RNASeq ... The column headers must be the sample names that are same as the sample names in clinical data.

sampleNames

character vector, sample names in a given order (such as diagnosis). No redundant entries allowed.

Value

omicsData

copy of the first argument with columns in new order.

Author(s)

Henry Zhang

Examples

1
2
3
4
    data(RNASeqDemoData)
    sampleNames <- colnames(RNASeqDemoData)[-1]
    sampleNames <- sampleNames[length(sampleNames):1]
    expr <- sortOmicsDataByColumn(RNASeqDemoData, sampleNames)

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