MarcElosua / SPOTlight

Spatial Transcriptomics Capture Location Deconvolution
https://marcelosua.github.io/SPOTlight
GNU General Public License v3.0
159 stars 25 forks source link

Suspected incorrect variable names used in vignette #72

Closed Nick-Eagles closed 2 years ago

Nick-Eagles commented 2 years ago

Hello,

I've been following along with the Bioc release vignette and encountered an error at this code chunk:

mod_ls <- trainNMF(
    x = sce,
    y = spe,
    groups = sce$type,
    mgs = mgs,
    weight_id = "weight",
    group_id = "type",
    gene_id = "gene")

I suspect a couple variable names are mistaken here; for example, sce$type is not a column in the colData:

> sce$type
NULL

I changed the first code chunk to the following to solve the issue:

mod_ls <- trainNMF(
    x = sce,
    y = spe,
    groups = as.character(sce$free_annotation),
    mgs = mgs_df,
    weight_id = "mean.AUC",
    group_id = "cluster",
    gene_id = "gene"
)

Thanks for providing SPOTlight and let me know if I can provide more information.

Best,

-Nick

MarcElosua commented 2 years ago

Hi @Nick-Eagles,

Yes! You're right, thank you so much for spotting this! I will fix it in the next release!