Git Product home page Git Product logo

Comments (5)

MarcElosua avatar MarcElosua commented on July 18, 2024

Hi @YMSWhuang

Thank you very much for your interest on SPOTlight! My best guess is that one of the cell types doesn't have any marker genes.
What happens when you do:

unique(as.character(scRNA_mouse$cluster_annotated_general)) %in% unique(all.markers$cluster)

It should be all true since SPOTlight needs marker genes for each cell type to initialize the matrix prior to factorization. If this is the issue you can add a row/s to all.markers with genes representative of the missing population with dummy numbers for avg_log2FC.

Let me know if this helps!

from spotlight.

YMSWhuang avatar YMSWhuang commented on July 18, 2024

That's great answer! I checked my scRNA_mouse$cluster_annotated_general and "cluster" in my all.markers, and I found something differences in these cell types. Thanks.

from spotlight.

SuqinYang avatar SuqinYang commented on July 18, 2024

Hi,
Thanks for this very useful tool your design! I'm having the same question.I don't know how to solve it. Thanks a lot.
The error:

res <- SPOTlight(x = sce,
y = spe,
groups =as.character(sce$cell_type_sub),
mgs =cluster_markers_all_1 , #mgs_df,
#hvg = hvg,
#weight_id = "mean.AUC",
group_id = "cluster",
gene_id = "gene")

Error in trainNMF(x = x, y = y, groups = groups, mgs = mgs, n_top = n_top, :
ids %in% names(mgs) are not all TRUE

names(cluster_markers_all_1)
[1] "p_val" "avg_log2FC" "pct.1" "pct.2" "p_val_adj" "cluster" "gene"

unique(sce$cell_type_sub)%in%unique(cluster_markers_all_1$cluster)
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[19] TRUE TRUE TRUE TRUE TRUE TRUE

from spotlight.

MarcElosua avatar MarcElosua commented on July 18, 2024

Hi @SuqinYang ,

My best guess is that the weight_id parameter should be set to avg_log2FC since as you have it currently set up SPOTlight is looking for a weight column.

Hope this helps!
Marc

from spotlight.

SuqinYang avatar SuqinYang commented on July 18, 2024

The problem is solved. Thank you so much!

from spotlight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.