Skip to content

Wrong number of clusters and extraction barcodes #8

@sbarvaux

Description

@sbarvaux

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions