ncborcherding / escape

Easy single cell analysis platform for enrichment
https://www.borch.dev/uploads/screpertoire/articles/running_escape
MIT License
143 stars 20 forks source link

runEscape not passing BPPARAM properly #105

Closed LinearParadox closed 2 months ago

LinearParadox commented 2 months ago

Currently, when you use runEscape the package ignores multiprocess settings. I'm pretty sure this is due to the runEscape function not passing the object to the escape.matrix method.

Currently it is:

function (input.data, gene.sets = NULL, method = "ssGSEA", groups = 1000, 
    min.size = 5, normalize = FALSE, make.positive = FALSE, new.assay.name = "escape", 
    BPPARAM = SerialParam(), ...) 
{
    .checkSingleObject(input.data)
    enrichment <- escape.matrix(input.data = input.data, gene.sets = gene.sets, 
        method = method, groups = groups, min.size = min.size)
    input.data <- .adding.Enrich(input.data, enrichment, new.assay.name)
    return(input.data)
}

It seems to work when modified to:

function (input.data, gene.sets = NULL, method = "ssGSEA", groups = 1000, 
    min.size = 5, normalize = FALSE, make.positive = FALSE, new.assay.name = "escape", 
    BPPARAM = SerialParam(), ...) 
{
    .checkSingleObject(input.data)
    enrichment <- escape.matrix(input.data = input.data, gene.sets = gene.sets, 
        method = method, groups = groups, min.size = min.size, BPPARAM = BPPARAM)
    input.data <- .adding.Enrich(input.data, enrichment, new.assay.name)
    return(input.data)
}
ncborcherding commented 2 months ago

Hey Alexei,

You are totally correct, just commited the fix to the repository and will update bioconductor version soon.