Learn R Programming

oppar (version 1.0.2)

getSampleOutlier: Retrieving outlier genes in samples

Description

Returns a list of outlier genes for each given sample

Usage

getSampleOutlier(profileMatrix, sample.name)

## S3 method for class 'matrix,nuchar': getSampleOutlier(profileMatrix, sample.name)

## S3 method for class 'OPPARList,nuchar': getSampleOutlier(profileMatrix, sample.name)

Arguments

profileMatrix
A matrix of 0, -1 and 1 representing outlier genes in samples. Also an object of type OPPARList.
sample.name
A character vector containing one or more sample names, or a numeric vector containing sample indices.

Value

  • A list of lists. For each given sample, the fuction return up-regulated and down-regulated outlier genes.

Methods (by class)

  • profileMatrix = matrix,sample.name = nuchar: A method for getSampleOutlier
  • profileMatrix = OPPARList,sample.name = nuchar: A method for getSampleOutlier

Examples

Run this code
data(GSE46141)
library(Biobase)
group <- sapply(pData(bcm)$source_name_ch1, function(x){ ifelse(x == "breast",0,1)})
group <- factor(group)
bcm.opa <- opa(bcm,group=group)
# Outlier profile for sample "GSM1124929"
getSampleOutlier(bcm.opa, "GSM1124929")

# Also can use sample index, instead of sample name
getSampleOutlier(bcm.opa, 11)

# A vector of sample names/indices are accepted as well
getSampleOutlier(bcm.opa, c(1,2))
getSampleOutlier(bcm.opa, c("GSM1124929","GSM1124941"))

Run the code above in your browser using DataLab