-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hi,
I am trying to apply the RaceID/StemID pipeline to my scRNA seq dataset, however, even though I am setting the number of clusters to a specific number with this line sc <- clustexp(sc,cln=10,sat=FALSE), I systematically end up with a higher number of clusters at the end.
How can I manage this ?
Also, I am initially working with a Seurat object, ultimately, I would like to extract the barcodes that show the highest score in StemID and see to which cluster it matches in my Seurat Object.
With "combined" beeing my Seurat object, here is the script used :
`combined_counts <- as.matrix(GetAssayData(combined, slot = "counts"))
combined_meta <- combined@meta.data
n<-colnames(combined_counts)
b<-list(n[grep("^CON89",n)],n[grep("^CON90",n)])
Create SCseq object for RaceID + batch effect correction
sc <- SCseq(combined_counts)
sc <- filterdata(sc, LBatch=b, bmode="RaceID",mintotal = 1000) # Adjust 'mintotal' based on your data
sc <- compdist(sc, metric = "pearson")
sc <- clustexp(sc)
sc <- clustexp(sc,cln=10,sat=FALSE)
sc <- findoutliers(sc)
plotbackground(sc)
plotsensitivity(sc)
plotoutlierprobs(sc)
clustheatmap(sc)
Run t-SNE
sc <- comptsne(sc)
sc <- compumap(sc)
saveRDS(sc, file="sc_object_final_before_StemID.rds")
Run RaceID and StemID analysis
stem <- Ltree(sc)
stem <- compentropy(stem)
stem <- projcells(stem, cthr = 5, nmode = FALSE)
stem <- projback(stem, pdishuf = 100)
stem <- lineagegraph(stem)
stem <- comppvalue(stem, pthr = 0.05)
Identify stem cell clusters
stemID_scores<- compscore(stem)