Description Usage Arguments Examples
View source: R/single-sample-scoring-methods.R
Calculate single sample geneset score by average z-score method
1 |
x |
gene x sample matrix |
summary |
sqrt or mean |
trim |
calculate trimmed mean? |
1 2 3 4 5 6 7 8 9 10 11 | vm <- exampleExpressionSet(do.voom=TRUE)
gdb <- conform(getMSigGeneSetDb('H', "human", "entrez"), vm)
features <- featureIds(gdb, 'H', 'HALLMARK_INTERFERON_GAMMA_RESPONSE',
value='x.idx')
scores <- zScore(vm[features,])$score
## Use scoreSingleSamples to facilitate scoring of all gene sets
scores.all <- scoreSingleSamples(gdb, vm, 'zscore')
s2 <- with(subset(scores.all, name == 'HALLMARK_INTERFERON_GAMMA_RESPONSE'),
setNames(score, sample_id))
all.equal(s2, scores)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.