Comments (6)
Hi @bbimber I'm not sure how you're using that command, but if you want to pull the models from R using reticulate I'd recommend you do this:
library(reticulate)
celltypist <- reticulate::import("celltypist")
celltypist$models$download_models(TRUE)
and from bash you can invoke the python module+method like this:
python -c "import celltypist; celltypist.models.download_models(True)"
from celltypist.
@prete Thanks. While my example was a simple --update_models, do you know if one could replicate a more complex command-line as command-line arguments, rather than converting to python code? your idea about '-c' is a reasonable fallback.
from celltypist.
@bbimber, not sure I understand correctly, but if you want to use celltypist as command-line, after installing it, you can just do celltypist --update-models
in the shell environment.
from celltypist.
I realize this is a little abnormal, but here's the logic. We have an R package that calls celltypist. If someone installs the R package, I cant really control their environment. Therefore I dont know if celltypist is on their $PATH. R-Reticulate will provide the location of the python executable, and python can resolve the celltypist package.
The specific code is here, where I'm just assuming celltypist is in the $PATH currently:
The reason I opened this thread is because I was hoping there was some existing python hook I'm just not seeing, like "python.exe -m celltypist.command_line [arguments]". I assume this doesnt work since it somehow circumvents the arg-parsing code?
In contrast, we're able to run another command-line python tool, GMM-Demux, by calling their python entrypoint directly and passing in the full command-line args:
Also, my example of --update-models was mainly for example. Our goal is to run the full command-line in a way that didnt require knowing the location of your celltypist executable. Anyway, 'python -c' is a reasonable solution, like you suggested.
from celltypist.
@bbimber, this has been fixed by calling the main()
function. 0e16949
This will be reflected in the next release, I will let you know then; for now, maybe you can install the latest CellTypist from Github?
from celltypist.
@ChuanXu1 thanks - i really appreciate this!
from celltypist.
Related Issues (20)
- " have completed preprocessing and cell clustering. " HOT 2
- codes for harmonizing the cell labels HOT 2
- the question about conf_score HOT 3
- CellTypist_Immune_Reference_v2 question HOT 2
- Immune_All_Low - model training question HOT 4
- Cluster-level label prediction HOT 1
- Running celltypist with concatenated dataset HOT 3
- Running the CellTypist training function celltypist.train on a subset of genes HOT 1
- ValueError in celltypist.annotate HOT 3
- is it available to generate model.pkl file from a marker gene list HOT 1
- Feature: Support Rapids-singlecell HOT 1
- Request: allow to specify AnnData layer to use HOT 1
- confidence score definition HOT 2
- Issues running with conda HOT 3
- Using model trained by scRNA-seq datasets to predict Spatial transcriptmoic dataset HOT 2
- Unable to allocate xxx GiB for an array with shape and data type float64 HOT 2
- Running `celltypist.annotate` with `min_prop` can't create "Heterogeneous" category HOT 2
- Use of metacells? HOT 4
- unable to download models HOT 3
- Feature Request: Store freqs in annotation when majority_vote set to True HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celltypist.