nmikolajewicz / scmiko Goto Github PK
View Code? Open in Web Editor NEWR package developed for single-cell RNA-seq analysis. It was designed using the Seurat framework, and offers existing and novel single-cell analytic work flows.
License: Other
R package developed for single-cell RNA-seq analysis. It was designed using the Seurat framework, and offers existing and novel single-cell analytic work flows.
License: Other
Hi,
While running findCDImarkers function I had this error:
2024-03-26 13:26:58.175816: Computing co-dependency indices...
|++++++++++++++++++++++++++++++++++ | 67% ~04s Error in binom.test(x = imat[i, j], n = ncol(emat), p = fmat[i, j], alternative = "greater") :
'p' must be a single number between 0 and 1
In addition: There were 50 or more warnings (use warnings() to see the first 50)
when I check the warnings I get :
length(x) * length(y) : NAs produced by integer overflow
and I think it is due to this step here:
pmat <- mysapply(which.cells2, function(x) sapply(which.cells,
function(y) length(x) * length(y)))
and I fixed the error by taking integers with as.integer64() from the bit64 package to handle larger integer values.
pmat <- mysapply(which.cells2, function(x) sapply(which.cells,
function(y) as.integer64(length(x)) * as.integer64(length(y))))
However this inflated my FDR values. Could you help in this?
Hello Dr. Mikolajewicz!
A very nice and useful tool for single-cell! Thanks!
I have a question: did you consider using tools, such as miQC developed by the Greene Laboratory at the University of Colorado Anschutz, for mitochondrial quality control?
What I mean is that using an arbitrary threshold could eliminate cells that are actually good. Accordingly, recent work has shown these thresholds can be highly dependent on the organism or tissue, the type of scRNA-seq technology used, or the protocol-specific decisions made as part of the disassociation, library preparation, and sequencing steps (Osorio D, Cai JJ. Systematic determination of the mitochondrial proportion in human and mice tissues for single-cell RNA-sequencing data quality control. Bioinformatics. 2020).
Here the error
multiSpecificity(object = seurat_object_v5)
Error in getExpressionMatrix(object, which.data = "data") :
no slot of name "data" for this object of class "Assay5"
I think an update in the package to make it compatible with Seurat v5 would be great
Hi
When I run:
so.gene <- runSSN(object = obj, features = unique(c(features_hvg, features_dev)), scale_free = T,
robust_pca = F, data_type = "pearson", reprocess_sct = T, slot = c("scale"), batch_feature = NULL,
pca_var_explained = 0.9, optimize_resolution = T, target_purity = 0.8, step_size = 0.05, n_workers = parallel::detectCores(),
verbose = F)
I get:
Error in self$geom$rename_size && "size" %in% names(plot$mapping) :
invalid 'x' type in 'x && y'
If you could help, I would really appreciate it, thanks
Chris
Tried installing from Github.
> remotes::install_github("NMikolajewicz/scMiko")
Downloading GitHub repo NMikolajewicz/scMiko@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/NMikolajewicz/scMiko/tarball/HEAD' failed
Then I tried to download and install it locally.
> install.packages("~/Downloads/scMiko-master.zip", repos = NULL, type = "win.binary")
Error in install.packages : cannot install Windows binary packages on this platform
R version 4.1.0 (2021-05-18)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS
Hi Team.
Nice package. I followed the code from the tutorial changing only the seurat object names and the assay names (SCT or integrated). I found that the tool always seems to output 0.5 as the optimal res from the CDI specificity graph and 1.0 res as optimal from the multi-level resolution specificity score graph even when different datasets are used. Also, the R Session crashes when I try to run the multiSilhouette() function. Is there a way to refine the analysis to output the optimal res parameter? Thank you.
Hi,
I ran devtools::install_github(repo = "NMikolajewicz/scMiko")
but got the error message
Downloading GitHub repo NMikolajewicz/scMiko@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/NMikolajewicz/scMiko/tarball/HEAD' failed
I
Thank you for this interesting and useful package.
I am running it on my 10x single cell data to identify optimal clustering parameters and marker genes.
I am running the script as they appear in the vignette. First I use the cluster optimisation vignette. Once identified the desired resolution I ran the FindClusters command and ran the CDI DEG analysis. This is when I saw that the top marker genes displayed for resolution optimisation were different then the ones for the DEG analysis.
I am attaching the relevant images:
Thank you for your help
Dear developer,
I am just wondering about the function ens2sym?
How to use this to convert the ens to gene symbol for seurat?
I tried it but nothing changed.
Thanks for your help
Dear Professor,
I tried to follow the Cell-type annotation using Miko Scoring pipeline with pbmc3k example dataset but with an error message with mikoScore function, and the error message was "2022-09-21 19:11:13: Optimal bin size: 10
2022-09-21 19:11:13: Running cell scoring...
Error in grep(pattern = paste0("^", s, "$"), x = match, ignore.case = TRUE, : formal performance’^[CD3D$' wrong"
And the original code was
library(scMiko)
library(Seurat)
library("SeuratData")
data(pbmc3k)
marker.df <- geneSets[["CellMarker_Hs_Zhang2019"]]
marker.list <- wideDF2namedList(marker.df)
marker.list <- lapply(marker.list, toupper)
marker.list <- marker.list[unlist(lapply(marker.list, length)) > 3]
ns.res <- nullScore(object = pbmc3k, assay = DefaultAssay(pbmc3k), n.replicate = 25,
nbin = 24, min.gs.size = 2, max.gs.size = 200, step.size = 10, nworkers = 16,
verbose = T, subsample.n = 2000)
pbmc_scored <- mikoScore(object = pbmc3k, geneset = marker.list, nbin = 10,
nullscore = ns.res, assay = DefaultAssay(pbmc3k), nworkers = 18)
"
and with variance-gene set-size relationship plot like this
I appreciate this nice R package, but I ran into a problem when following the “Cluster Optimization” vignette. The issue is that “plt.auc.dot” is NULL. I checked the multiSpecificity code and noticed that the whole R package does not have a multiDEG function. Is there something wrong with this part? I hope you can help me with this.
Hi,
I recently found your package which will help make my scripts shorter, but I realized that the silhouette values obtained by you were different from the ones I got. Checking your function I saw that you only use the 2 UMAP dimensions to calculate the distance.
df.umap <- getUMAP(object)[["df.umap"]]
umap.dist <- dist(x = (df.umap[, c("x", "y")]), method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
...
sil <- cluster::silhouette(x = clust.mem, dist = umap.dist)
In codes and functions I have seen in the past they use the PCAs, instead of UMAP. Here two examples:
https://rdrr.io/github/jr-leary7/YehLabClust/src/R/ComputeSilhouetteScores.R
https://bioinformatics-core-shared-training.github.io/UnivCambridge_ScRnaSeq_Nov2021/Markdowns/08_ClusteringPostDsi.html#1212_Separatedness
In my own code, I use the harmony dimensions, as I'm integrating datasets
dimensions <- 1:15
pc.dist <- dist(x = Embeddings(object = seu[["harmony"]])[, dimensions])
sil <- silhouette(x = as.numeric([email protected]$seurat_clusters), dist = pc.dist)
For a given resolution, for example, with my code I get score of 0.4 and with scMiko 0.63. So I was wondering which one is the most appropriate to do.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.