Learn R Programming

maigesPack (version 1.36.0)

getLabels: Method getLabels to pick gene and sample labels

Description

Generic function getLabels to extract labels given an ID to genes or samples.

Usage

getLabels(obj, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)
"getLabels"(obj=NULL, labelID=NULL, sLabel=TRUE)

Arguments

obj
object to look for labels. Methods defined for classes maigesRaw, maiges, maigesDE, maigesDEcluster, RGList, MAList, marrayRaw and marrayNorm.
labelID
character string with label name to be searched.
sLabel
logical indicating search in the sample labels, defaults to TRUE. If FALSE search is done for gene labels.

Details

The name of gene labels are done by the names of the slot Glabels in objects of classes maigesRaw or maiges, the slot GeneInfo in objects of classes maigesDE or maigesDEcluster, the slot genes in objects of classes RGList or MAList and the slot maGnames@maInfo in objects of classes marrayRaw or marrayNorm. Equivalently, the name of sample labels are done by the names of the slots Slabels, SampleInfo, targets and maTargets@maInfo.

Examples

Run this code
## Loading dataset
data(gastro)

## Getting the 'Tissue' label for samples in maigesRaw class object
getLabels(gastro.raw, "Tissue", sLabel=TRUE)

## Getting the 'Type' label for samples in maigesNorm class object
getLabels(gastro.summ, "Type", sLabel=TRUE)

## Getting the 'GeneName' label for genes (spots) in maigesRaw class object
getLabels(gastro.raw, "GeneName", sLabel=FALSE)

## Getting the 'Annot' label for samples in maigesNorm class object
getLabels(gastro.summ, "Annot", sLabel=FALSE)

Run the code above in your browser using DataLab