GithubHelp home page GithubHelp logo

dgrun / raceid3_stemid2_package Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 11.0 40.06 MB

Algorithm for the inference of cell types and lineage trees from single-cell RNA-seq data. This is a novel R package of the RaceID3 and StemID2 method including novel functionalities and performance improvements compared to the previous RaceID3/StemID2 version in the RaceID3_StemID2 repository. The RaceID3_StemID2 repository will not be updated anymore in the future.

R 96.97% C++ 3.03%

raceid3_stemid2_package's People

Contributors

dgrun avatar kant avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar

raceid3_stemid2_package's Issues

Feel confused on RaceID vignettes

Hi,
I have read the vignettes on R-CRAN , but I feel confused with here

The resulting lineage graph can be inspected and reveals the expected trajectories connecting the stem cells (cluster 2 and 3 of cycling and quiescent cells, respectively) to enterocytes (cluster 4) via transiently amplifying progenitors (cluster 1), to Paneth cells (cluster 7), and to goblet cells (cluster 6). The StemID score suggests stem cell identity for clusters 2 and 3

What puzzles me is the StemID score of cl.1 and cl.8 is higher than cl.2 and cl.3. But the StemID score suggests stem cell identity for clusters 2 and 3.

Here is the stemid score

ย  | links | entropy | StemIDscore
cl.1 | 3 | 0.109705 | 0.329115
cl.2 | 3 | 0.100491 | 0.301474
cl.3 | 4 | 0.082126 | 0.328503
cl.4 | 2 | 0.098243 | 0.196486
cl.5 | 0 | 0.099537 | 0.000000
cl.6 | 1 | 0.081058 | 0.081058
cl.7 | 2 | 0.000000 | 0.000000
cl.8 | 3 | 0.131742 | 0.395227

Thank you for your help.

Error in if (quantile(x, 1 - pthr) < cm[i, j]) 0 else 0.5

Hi all, when I run to this step, it showed an error like this.

ltr <- comppvalue(ltr, pthr = 0.01, sensitive = FALSE)
Error in if (quantile(x, 1 - pthr) < cm[i, j]) 0 else 0.5 :
missing value where TRUE/FALSE needed

The original matrix was extracted from a Seurat object like this:
pro='S1'
sce <- CreateSeuratObject(Read10X('./scdata/allraw/day0/'),
pro)
sce <- NormalizeData(sce, normalization.method = "LogNormalize",
scale.factor = 10000)
GetAssay(sce,assay = "RNA")
sc <- as(as.matrix(sce@assays$RNA@counts), 'sparseMatrix')
sc <- SCseq(sc)
sc <- filterdata(sc,FGenes = hbb)
hbb <- rownames(sce)[grep("^Hbb",rownames(sce))]
sc <- filterdata(sc,FGenes = hbb)
sc_p <- compdist(sc,metric="pearson")
sc_p_n20_k <- clustexp(sc_p,sat = T,clustnr = 20,FUNcluster = 'kmedoids')
plotsaturation(sc_p_n20_k,disp=FALSE)
plotjaccard(sc_p_n20_k)
sc_p_n20_k <- clustexp(sc_p_n20_k,cln=10,sat=FALSE)
sc_p_n20_k <- findoutliers(sc_p_n20_k)
plotbackground(sc_p_n20_k)
plotsensitivity(sc_p_n20_k)
plotoutlierprobs(sc_p_n20_k)
clustheatmap(sc_p_n20_k)
sc_p_n20_k <- comptsne(sc_p_n20_k)
sc_p_n20_k <- compfr(sc_p_n20_k,knn=10)
sc_p_n20_k <- compumap(sc_p_n20_k)
plotmap(sc_p_n20_k, final = T, tp = 1, fr = T, um = F, cex = 0.5)
plotexpmap(sc_p_n20_k,"Procr",logsc=TRUE,fr=F)
ltr <- Ltree(sc_p_n20_k)
ltr <- compentropy(ltr)
ltr <- projcells(ltr,cthr=5,nmode=FALSE,fr=TRUE)
ltr <- projback(ltr,pdishuf=100)
ltr <- lineagegraph(ltr)
everything is OK until comppvalue

Error in pruneKnn(): constraints are inconsistent, no solution!

Hi,

I am trying to analyse a scRNA-seq data-set using the VarID package and ran into errors with the pruneKnn function:

`res <- pruneKnn(d,large=TRUE,regNB=T,knn=10,alpha=10,no_cores=8, pcaComp = 100)

Error in checkForRemoteErrors(val) :
8 nodes produced errors; first error: constraints are inconsistent, no solution!`

What do you think might be the problem?
I played around with the input parameters - large, regNB, alpha, pcaComp - with no luck.
The same count matrix and SCseq object work fine with RaceID and StemID functions.
And, to check installation issues, I ran pruneKnn() using a different data-set and it ran ok.

Thank you for your help.

From Seurat to RaceID3_StemD2

Also, It will be great if you can add a functionality of importing Seurat integrated objects to RaceID3_StemD2 so that I can run pseudotime and trajectory analyses by StemD2.

Thanks.

Error in cluster::pam(as.dist(x), k) : NA values in the dissimilarity matrix not allowed.

Hi ๐Ÿ˜Š,

I am trying to use a count matrix (.tsv dense matrix) into this function sc <- ### SCseq() but it does not seem to be able to read it. Therefore, I uploaded it first as data.table and then passed it into the function and it seems to be fine (why?).
However, after filtering the cells and computing a distance matrix I get the following error:

Error in cluster::pam(as.dist(x), k) : NA values in the dissimilarity matrix not allowed.

What do you think is causing the issue and how do I fix it?

I attached the screenshot for more info.
Screenshot 2020-02-28 at 10 58 56

Thank you
Sara

how to convert the SCseq to SingleCellExperiment (scater) or seurat input?

Hi,

Thanks for your developing wonderful tools for discovering the rare cell population. I have tried to use Raceid followed the online protocol (https://cran.r-project.org/web/packages/RaceID/vignettes/RaceID.html). However, I am confused that how to identify the cell cluster. For example, I tried to find a rare cell population only expressed "zbtb16", but I didn't know how to do that. I can use the command "x <- data.frame(CELLID=names(sc@cpart),cluster=sc@cpart)" to extract the cells and their clusters. But I don't know how to find the specific expressed genes in each cluster cells. In your manual, the genes expression could be visulized by heatmap. But I found it is hard to visulize in more than thousands of cells. For example, I got the heatmap as followed:
image

In this figure, it is that the target genes expressed only in small cell population.
Hence, is any possible way to check the target genes expression in each cell population? I though violent plot or boxplot may be a better ways to visulize in each cell cluster. Can I convert the SCseq data format into SingleCellExperiment format or Seurat format, so that I can use "plotExpression"(Scater) or "VlnPlot" (Seurat) to visulize the target gene expression?

I am appreciated for your help!
Thanks!
Best,
Garen

RaceID3 using 10x datasets

Hello I wish to cluster my single cell 10x data using RaceID3. However, I cannot load my 10x data into RaceID using their function SCseq

10x gave me 3 files:

  1. barcodes.tsv.gz
  2. features.tsv.gz
  3. matrix.mtx.gz

I tried using the Matrix package in R as given on the 10x website.

library(Matrix)
matrix_dir = "C:/Users/s/Downloads/"
barcode.path <- paste0(matrix_dir, "barcodes.tsv.gz")
features.path <- paste0(matrix_dir, "features.tsv.gz")
matrix.path <- paste0(matrix_dir, "matrix.mtx.gz")
mat <- readMM(file = matrix.path)
feature.names = read.delim(features.path, 
                       header = FALSE,
                       stringsAsFactors = FALSE)
barcode.names = read.delim(barcode.path, 
                       header = FALSE,
                       stringsAsFactors = FALSE)
colnames(mat) = barcode.names$V1
rownames(mat) = feature.names$V1

And it fails to allocate a huge amount of memory

> sc <- SCseq(mat)
Error: cannot allocate vector of size 6823.1 Gb

I also tried using Seurat's Read10X function :

library(Seurat)
library(RaceID)
pbmc.data <- Read10X(data.dir = "C:/Users/s/Downloads/")
sc <- SCseq(pbmc.data)

Here is my pbmc.data

> pbmc.data
33694 x 27179520 sparse Matrix of class "dgCMatrix"

This is the error i get :

sc <- SCseq(pbmc.data)
Error in asMethod(object) : Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105

I understand that RaceID requires a sparse matrix which I am already providing. Can you please explain? Thank you!

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.