Open Pancreaticpathway opened 1 year ago
Hi estellad,
I had the same problem and it was solved by doing the following:
Open a command prompt or terminal. Execute the following command: pip install scikit-learn or if you have both Python 2 and Python 3 installed, use: pip3 install scikit-learn Wait for the installation process to complete. It will download and install the scikit-learn module and its dependencies. After the installation is finished, restart R and you will be able to use sklearn in your Python scripts or within the R code that relies on it.
Thank you! @CVendrell11 This could be specified in this repo's installation instruction, as an enhancement ;)
@CVendrell11 Thank you for the tool. I have already installed scikit-learn in my laptop and failed to replicate the code. The error message shows below:
Error: ImportError: No module named sklearn.linear_model
And the code I used is:
data(hcl.sc)
data(gene.anno)
data(tcga.data.u)
data(GSE136103)
obj.seu <- GSE136103
ref.obj <- hcl.sc
ref.expr <- GetAssayData(ref.obj, slot = 'data') %>% as.data.frame
ref.expr
.ref.anno <- Idents(ref.obj) %>% as.character
results = scAnno(query = obj.seu, ref.expr = ref.expr, ref.anno = ref.anno, save.markers = "markers", cluster.col = "seurat_clusters", factor.size = 0.1, pvalue.cut = 0.01, seed.num = 10, redo.markers = FALSE, gene.anno = gene.anno, permut.num = 100, permut.p = 0.01, show.plot = TRUE, verbose = TRUE, tcga.data.u = tcga.data.u )
Can you help?
Best, Yijia
Similar issue appeared when running scAnno(): [INFO] Checking the legality of parameters [INFO] 30 cell types in reference, 35 clusters in query objects [INFO] Deconvolution by using RLM method [INFO] Logistic regression for cell-type predictions, waiting... Error: ModuleNotFoundError: No module named 'sklearn'