# Simulate Gaussian expression data for 10 genes and 10 samples
# (Note: cancer expression should be FPKM+1 for real applications)
cancer.gene.expr=matrix(rnorm(200), nrow=20)
# Create arbitrary Ensembl IDs
gene.ids = c("ENSG00000000003","ENSG00000000005","ENSG00000000419",
"ENSG00000000457","ENSG00000000460","ENSG00000000938",
"ENSG00000000971","ENSG00000001036","ENSG00000001084",
"ENSG00000001167")
colnames(cancer.gene.expr) = gene.ids
# Define a collection with two disjoint sets that span the 10 genes
collection=list(set1=gene.ids[1:5], set2=gene.ids[6:10])
# Execute TPAC on both sets
tpacForCancer(cancer.gene.expr=cancer.gene.expr, cancer.type="glioma",
gene.set.collection=collection)
Run the code above in your browser using DataLab