Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the error with liger #224

Open
honghh2018 opened this issue Jun 13, 2021 · 12 comments
Open

the error with liger #224

honghh2018 opened this issue Jun 13, 2021 · 12 comments
Labels
question Further information is requested

Comments

@honghh2018
Copy link

Hi ,
The error occurred indicate that liger not found, when i run the liger method to integrated my scRNA-seq Data.
It was weird, because of i had installed the rliger and the library(rliger) work well.
But the error showing
error: Unable to find package MacoskoLab/liger, please install
it was very confused.
how can i fix this issue?
Any advice would be appreciated.
Best,
hanhuihong

@cgao90
Copy link
Collaborator

cgao90 commented Jun 13, 2021

Hi, could you share the session info and the code that gave the error?

@honghh2018
Copy link
Author

Hi, could you share the session info and the code that gave the error?
The code post below:
library(Seurat)
library(dplyr)
library(rliger)
library(SeuratWrappers)
library(stringr)
library(plyr)
library(data.table)

pbmcsca <- NormalizeData(obj)
pbmcsca <- FindVariableFeatures(pbmcsca,nfeatures = 2000)

pbmcsca <- ScaleData(pbmcsca, split.by = "orig.ident", do.center = FALSE)
pbmcsca <- RunOptimizeALS(pbmcsca, k = 20, lambda = 5, split.by = "orig.ident")
pbmcsca <- RunQuantileNorm(pbmcsca, split.by = "orig.ident")

RunQuantileNorm according to your needs

pbmcsca <- FindNeighbors(pbmcsca, reduction = "iNMF", dims = 1:30)
pbmcsca <- FindClusters(pbmcsca, resolution = 0.4)

and the R sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /share/nas1/Data/software/R/R-4.0.2/lib64/R/lib/libRblas.so
LAPACK: /share/nas1/Data/software/R/R-4.0.2/lib64/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C
[3] LC_TIME=zh_CN.UTF-8 LC_COLLATE=zh_CN.UTF-8
[5] LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES=zh_CN.UTF-8
[7] LC_PAPER=zh_CN.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] data.table_1.13.6 plyr_1.8.6 stringr_1.4.0
[4] SeuratWrappers_0.3.0 rliger_1.0.0 patchwork_1.1.1
[7] Matrix_1.2-18 cowplot_1.1.1 dplyr_1.0.4
[10] SeuratObject_4.0.0 Seurat_4.0.2

loaded via a namespace (and not attached):
[1] nlme_3.1-148 matrixStats_0.58.0 spatstat.sparse_2.0-0
[4] bit64_4.0.5 doParallel_1.0.16 RcppAnnoy_0.0.18
[7] RColorBrewer_1.1-2 httr_1.4.2 sctransform_0.3.2
[10] tools_4.0.2 R6_2.5.0 irlba_2.3.3
[13] rpart_4.1-15 KernSmooth_2.23-17 uwot_0.1.10
[16] mgcv_1.8-31 DBI_1.1.1 lazyeval_0.2.2
[19] colorspace_2.0-0 tidyselect_1.1.0 gridExtra_2.3
[22] bit_4.0.4 compiler_4.0.2 hdf5r_1.3.3
[25] plotly_4.9.3 scales_1.1.1 lmtest_0.9-38
[28] spatstat.data_2.1-0 ggridges_0.5.3 pbapply_1.4-3
[31] goftest_1.2-2 digest_0.6.27 spatstat.utils_2.1-0
[34] pkgconfig_2.0.3 htmltools_0.5.1.1 parallelly_1.23.0
[37] fastmap_1.1.0 htmlwidgets_1.5.3 rlang_0.4.10
[40] FNN_1.1.3 shiny_1.6.0 generics_0.1.0
[43] riverplot_0.10 zoo_1.8-8 jsonlite_1.7.2
[46] mclust_5.4.7 ica_1.0-2 magrittr_2.0.1
[49] Rcpp_1.0.6 munsell_0.5.0 abind_1.4-5
[52] reticulate_1.18 lifecycle_0.2.0 stringi_1.5.3
[55] MASS_7.3-51.6 Rtsne_0.15 grid_4.0.2
[58] parallel_4.0.2 listenv_0.8.0 promises_1.2.0.1
[61] ggrepel_0.9.1 crayon_1.4.1 miniUI_0.1.1.1
[64] deldir_0.2-9 lattice_0.20-41 splines_4.0.2
[67] tensor_1.5 pillar_1.4.7 igraph_1.2.6
[70] spatstat.geom_2.1-0 future.apply_1.7.0 reshape2_1.4.4
[73] codetools_0.2-16 leiden_0.3.7 glue_1.4.2
[76] remotes_2.2.0 BiocManager_1.30.10 foreach_1.5.1
[79] vctrs_0.3.6 png_0.1-7 httpuv_1.5.5
[82] gtable_0.3.0 RANN_2.6.1 purrr_0.3.4
[85] spatstat.core_2.1-2 polyclip_1.10-0 tidyr_1.1.2
[88] scattermore_0.7 future_1.21.0 assertthat_0.2.1
[91] ggplot2_3.3.3 rsvd_1.0.3 mime_0.9
[94] xtable_1.8-4 later_1.1.0.1 survival_3.1-12
[97] viridisLite_0.3.0 tibble_3.0.6 iterators_1.0.13
[100] cluster_2.1.0 globals_0.14.0 fitdistrplus_1.1-3
[103] ellipsis_0.3.1 ROCR_1.0-11
###the error lying below:
Calculating gene variances
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Calculating feature variances of standardized and clipped values
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Scaling data matrix
Error: Unable to find package MacoskoLab/liger, please install
stop executive

Hope help.

@cgao90
Copy link
Collaborator

cgao90 commented Jun 14, 2021

Thanks for the information. We changed the name of this R package a while ago (liger-->rliger), while the SeuratWrappers from previous version was trying to look for liger. Please install the latest SeuratWrappers and this should resolve the issue.

@honghh2018
Copy link
Author

Hi, it work as i reinstalled the SeuratWrapper,
But the result was very weird, like below when i was using the special marker DCN to draw the plot, the DCN feature was dispersed distribution. FeaturePlot(t2,features = 'CTSK',order = T)
image

image
The normal marker should be like below generated by seurat rpca integrated algorithm.
image
The code post below:

pbmcsca <- FindVariableFeatures(pbmcsca,nfeatures = 2000)

pbmcsca <- ScaleData(pbmcsca, split.by = "orig.ident", do.center = FALSE)
pbmcsca <- RunOptimizeALS(pbmcsca, k = 30, lambda = 5, split.by = "orig.ident")
pbmcsca <- RunQuantileNorm(pbmcsca, split.by = "orig.ident")

Any advice would be appreciated.
Best,
hanhuihong

@honghh2018
Copy link
Author

It seem like that liger algorithm of integration can not work well. Am i runing wrong with unreasonable parameter?
Any advices would be appreciated.
Best work,
Hanhuihong

@cgao90
Copy link
Collaborator

cgao90 commented Jun 16, 2021

Hi Hanhuihong,

Is it the pbmcsca (v3.0.0) from SeuratData you are working on? If possible, could you also share the code for the analysis (preprocessing, integration and plotting) so that we can try reproduce the error and investigate further.

@honghh2018
Copy link
Author

honghh2018 commented Jun 18, 2021

Hi @cgao90 ,
It wasn't the SeuratData's data. but taking same variables in my code to integrate myself datasets following the SeuratWrapper vignette.
The outcome was incorrected, they fail to cluster the same expression profile cell into one.
Am i make the wrong process in my data? it was impossible to make a mistake for this simple workflow ?
But the output become peculiar difference with other integrated algorithm like, seurat's rpca, sctransform,cca, fastqMNN,
Conos and so on.
how can i fix this ? the code was the lying above that i posted few days ago.
Any advices would be appreciated.
Hanhuihong

@cgao90
Copy link
Collaborator

cgao90 commented Jun 18, 2021

Hi,

For the split.by = "orig.ident" in ScaleData, RunOptimizeALS and RunQuantileNorm, is the "orig.ident" in your case referring to the names of the datasets when creating the object or the cell barcodes? According to the SeuratWrapper tutorial, it should be the dataset names (referred to as method, replicate, etc).

@honghh2018
Copy link
Author

It had to say the orig.ident was the seurat default columne name like below:
image
The seurat object own 20 samples in it like the table(g1$orig.ident) showing below
f_M f_T f_M6 f_T6 M1 M2 M3 ...
7423 4346 8746 10773 11624 9012 4494 ...
That i want to integrated by liger algorithm, but the cluster was skew.
That code was posted above.
Hope the reply.
Best,
hanhuihong

@skpalan
Copy link
Collaborator

skpalan commented Jun 22, 2021

Hi Alec, can you try plot by datasets? Just want to make sure whether all datasets are well mixed or not.
Also, how many cells are there in your datasets in total? It seems that you have more than 20 samples, so I guess that the total amount should be huge. In this case, I would suggest try a larger k like 40 and a higher lambda like 10.

@honghh2018
Copy link
Author

Hi @skpalan,
Thanks the reply.
Yes, the twenty samples had 170000 cells or so in total. and the each sample completedly mixed up in umap plot like below:
image
The integration would be retun again with the k=40 and lambda=10, Hope it work.
Let me prove it and reply this issue.
Best,
Hanhuihoing

@honghh2018
Copy link
Author

Unfortunately, It was showing the same issue, like i answer before, it had CSTK expressed everywhere but not in one cluster.
The plot like below:
image
The k and lambda separately preset with 40 and 10.
Any advices with this issue?
Best,
hanhuihong

@theAeon theAeon added the question Further information is requested label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants