Giter Club home page Giter Club logo

stemid's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stemid's Issues

Bypassing filterdata function

I can't run Ltree if I don't run the function filterdata. Is there any way to sort this issue? All I wish to do is calculate the cell entropy. Thanks.

Seurat object for StemID score evaluation

Hello!

Thank you for the wonderful software. I have a question, is it possible to run STEMID calculations for a Seurat object? I would like to calculate STEMID scores of clusters of cells that have been already calculated and projected using UMAP.

Thank you!

Wrong number of clusters and extraction barcodes

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 <- [email protected]

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)

projcells using sc instead of object@sc

There are two instances where sc is used instead of object@sc in projcells
line 889: pdil <- sc@tsne[f,]
line 894: cn <- as.data.frame(pdi[compmedoids(sc@fdata[,names(lp)],lp),])

Error when Seurat object is used for StemID score evaluation

Dear all,

I am trying to run StemID on my Seurat object on which I have done both the QC needed and the clustering analysis. I am following both the answer here and the tutorial here.

Unfortunately I meet the following error when I perform the comppvalue step.

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'

Here is all the code I am running:


# Create the sc object
seurat_integrated <- readRDS("file.rds")

ndata <- seurat_integrated@assays$RNA@counts[,]

sc <- SCseq(ndata)

# Filter for this
sc <- filterdata(sc, mintotal = 2000)

# Re-initialize raceID
part <- as.numeric([email protected]$seurat_clusters)
d <- as.matrix(dist(seurat_integrated@[email protected]))
umap <- as.data.frame(seurat_integrated@[email protected])
names(part) <- colnames(d)

n <- colnames(sc@ndata)
part <- part[n]

# partition
sc@cpart <- sc@cluster$kpart <- part
# distances
sc@distances <- d[n,n]
# umap
sc@umap <- umap[n,]
# expression data (optional)
sc@counts <- sc@counts * 0 + 1
sc@ndata  <- ndata[,n]
# cluster medoids
sc@medoids <- compmedoids(sc, sc@cpart)

col_cluster <- colorRampPalette(brewer.pal(12,"Set3"))(length(unique([email protected]$seurat_clusters)))
names(col_cluster) <- as.character(unique([email protected]$seurat_clusters))

set.seed(12345)
sc@fcol <- col_cluster[order(as.numeric(names(col_cluster)))]


# Run StemID

ltr <- Ltree(sc)

ltr <- compentropy(ltr)
ltr <- projcells(ltr,cthr=5,nmode=TRUE,fr=TRUE, um=T, knn=3)

ltr <- lineagegraph(ltr)

ltr <- comppvalue(ltr,pthr=0.05)
# Here I get the error

plotgraph(ltr,showCells=FALSE,showMap=TRUE)

x <- compscore(ltr)

Can anyone help me on this?
I really thank you in advance for this,
Have a great day,
Alessandro

Error about projcells

Hi, thank you for developing StemID! I tried to run StemID on my seurat object following the closed issues. However, it errors when I run the code:

 ltr <- projcells(
  object = ltr,
  cthr=5
)
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length

I will appreciate a lot if you help me! Thank you very much!

projcells command error

Hi, apologies if this might be a naive mistake I'm running into, however, when I run the command projcells(ltr)
I get the error
Error in .local(x, ...) : arguments must have same length
This occurs with the sample data, as well as my own dataset.
Traceback shows:

6.
stop("arguments must have same length") 
5.
.local(x, ...) 
4.
aggregate(pdil, by = list(lp), median) 
3.
aggregate(pdil, by = list(lp), median) at RaceID2_StemID_class.R#890
2.
projcells(ltr) at RaceID2_StemID_class.R#868
1.
projcells(ltr) 

Traceback highlights:

  nrx <- NROW(x)
  if (any(lengths(by) != nrx)) 
    **stop("arguments must have same length")**
  y <- as.data.frame(by, stringsAsFactors = FALSE)
  keep <- complete.cases(by)
  y <- y[keep, , drop = FALSE]
  x <- x[keep, , drop = FALSE]

To be completely honest, I have no idea what this means, being a novice at R and programming in general. Please let me know if I can provide any additional information.

My software versions:
RStudio Version 1.0.136
R version 3.3.2 (2016-10-31)
64bit Win10

Any insight into why this is failing at the beginning of StemID would be much appreciated.
Thanks!

Adding additional cell identifier

Hi I'm new to RaceID2/StemID

and have a question if I can add additional cell identifier to SCseq object.

such as sample IDs and replicate IDs. are there anyways to store meta.data of the object?

Thank you in advance!

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.