tni.annotate.samples: Annotate samples with external gene set collections.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function calculates an enrichment score between gene sets and samples.

Usage

1
2
tni.annotate.samples(object, geneSetList, minGeneSetSize = 15, 
    exponent = 1, verbose = TRUE)

Arguments

object

a preprocessed object of class 'TNI' TNI-class.

geneSetList

a list with gene sets.

minGeneSetSize

a single integer or numeric value specifying the minimum number of elements in a gene set that must map to elements of the gene universe. Gene sets with fewer than this number are removed from the analysis.

exponent

a single integer or numeric value used in weighting phenotypes in GSEA (this parameter only affects the GSEA statistics).

verbose

a single logical value specifying to display detailed messages (when verbose=TRUE) or not (when verbose=FALSE).

Details

Using the samples available in the provided TNI object, the 'tni.annotate.samples' calculates the enrichment of each sample for each gene set. First, a gene-wise differential expression (DEG) signature is generated by comparing the expression of a given sample with the avarage expression of all samples. The DEG signature is regarded as a the sample phenotype, representing the relative expression of the sample's genes in the cohort. Then a single-sample Gene Set Enrichment Analysis (ssGSEA) is used to calculate the enrichment score (ES) of the sample for a given gene set.

Value

A numeric matrix with association statistics between gene sets vs. samples.

Author(s)

Mauro Castro

See Also

TNI-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data(tniData)

## Not run: 

#generate a TNI object
rtni <- tni.constructor(expData=tniData$expData, 
        regulatoryElements=c("PTTG1","E2F2","FOXM1","E2F3","RUNX2"), 
        rowAnnotation=tniData$rowAnnotation)
rtni <- tni.permutation(rtni)
rtni <- tni.bootstrap(rtni)
rtni <- tni.dpi.filter(rtni)

#load a gene set collection
#here, we build three random gene sets for demonstration
geneset1 <- sample(tniData$rowAnnotation$SYMBOL,50)
geneset2 <- sample(tniData$rowAnnotation$SYMBOL,50)
geneset3 <- sample(tniData$rowAnnotation$SYMBOL,50)
geneSetList <- list(geneset1=geneset1,
                    geneset2=geneset2,
                    geneset3=geneset3)

#compute single-sample GSEA
#note: regulons are not required for this function, 
#as it will assess the samples in the TNI object
ES <- tni.annotate.samples(rtni, geneSetList)


## End(Not run)

RTN documentation built on Nov. 12, 2020, 2:02 a.m.