Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cell type annotation #3

Open
igordot opened this issue Oct 13, 2019 · 3 comments
Open

cell type annotation #3

igordot opened this issue Oct 13, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@igordot
Copy link

igordot commented Oct 13, 2019

Is it possible to add the cell types to the metadata?

@federicomarini
Copy link
Owner

Hi @igordot!
Since this information was not provided in the original data release, I did not include that back then in the original package submission.
As of now, the SingleR method is available in Bioconductor and can become a nice standard solution to address this.

I'll note it down to be revisited at some point, thanks for the suggestion! (ideally, an expansion of the vignette could be a way to cover this)

@federicomarini federicomarini added the enhancement New feature or request label Oct 14, 2019
@igordot
Copy link
Author

igordot commented Oct 14, 2019

Thanks for considering it! I assumed that type of information would be included. I mostly just wanted to makes sure I wasn't missing anything.

@federicomarini
Copy link
Owner

Just gave a quick trial run, and this seems to work.

Starting on the code from the vignette (say, sce is your bone marrow dataset, subset to keep it quick in the first run):

library(iSEE)
library(SingleR)
se_hpca <- HumanPrimaryCellAtlasData()
common <- intersect(rownames(sce), rownames(se_hpca))
sce_anno <- sce[common,]
se_hpca <- se_hpca[common,]
sce_anno
library(scater)
sce_anno <- logNormCounts(sce_anno)
pred <- SingleR(test=sce_anno,
                ref=se_hpca,
                labels=se_hpca$label.main,assay.type.ref = "logcounts")
table(pred$labels)
sce_anno$labels_sr <- pred$labels
plotTSNE(sce_anno, colour_by="labels_sr",text_by = "labels_sr")

(using current Rdevel setup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants