Analyse drug set enrichment
analyseDrugSetEnrichment(
sets,
stats,
col = NULL,
nperm = 10000,
maxSize = 500,
...,
keyColSets = NULL,
keyColStats = NULL
)
Named list of characters: named sets containing compound
identifiers (obtain drug sets by running prepareDrugSets()
)
Named numeric vector or either a similarPerturbations
or
a targetingDrugs
object (obtained after running
rankSimilarPerturbations
or
predictTargetingDrugs
, respectively)
Character: name of the column to use for statistics (only required
if class of stats
is either similarPerturbations
or
targetingDrugs
)
Number of permutations to do. Minimial possible nominal p-value is about 1/nperm
Maximal size of a gene set to test. All pathways above the threshold are excluded.
Arguments passed on to fgsea::fgseaSimple
minSize
Minimal size of a gene set to test. All pathways below the threshold are excluded.
scoreType
This parameter defines the GSEA score type. Possible options are ("std", "pos", "neg")
nproc
If not equal to zero sets BPPARAM to use nproc workers (default = 0).
gseaParam
GSEA parameter value, all gene-level statis are raised to the power of `gseaParam` before calculation of GSEA enrichment scores.
BPPARAM
Parallelization parameter used in bplapply. Can be used to specify cluster to run. If not initialized explicitly or by setting `nproc` default value `bpparam()` is used.
Character: column from sets
to compare with column
keyColStats
from stats
; automatically selected if NULL
Character: column from stats
to compare with column
keyColSets
from sets
; automatically selected if NULL
Enrichment analysis based on GSEA
Other functions for drug set enrichment analysis:
loadDrugDescriptors()
,
plotDrugSetEnrichment()
,
prepareDrugSets()
descriptors <- loadDrugDescriptors()
#> compound_descriptors_NCI60_2D.qs not found: downloading data...
drugSets <- prepareDrugSets(descriptors)
# Analyse drug set enrichment in ranked targeting drugs for a differential
# expression profile
data("diffExprStat")
gdsc <- loadExpressionDrugSensitivityAssociation("GDSC")
#> expressionDrugSensitivityCorGDSC7.qs not found: downloading data...
#> Warning: URL 'https://compbio.imm.medicina.ulisboa.pt/public/cTRAP/expressionDrugSensitivityCorGDSC7.qs': Timeout of 60 seconds was reached
#> Error in download.file(link, file, mode = mode): download from 'https://compbio.imm.medicina.ulisboa.pt/public/cTRAP/expressionDrugSensitivityCorGDSC7.qs' failed
predicted <- predictTargetingDrugs(diffExprStat, gdsc)
#> Error in predictTargetingDrugs(diffExprStat, gdsc): object 'gdsc' not found
analyseDrugSetEnrichment(drugSets, predicted)
#> Matching compounds with those available in drug sets...
#> Error in prepareStatsCol(col, stats): object 'predicted' not found