Patchouli-M / SequencingCancerFinder

MIT License
20 stars 6 forks source link

NameError: name 'args_utils' is not defined #3

Closed WhaleGe closed 1 month ago

WhaleGe commented 3 months ago

Thank you very much for providing such a useful package. This is more convenient for us to find tumor cells. However, I encountered some errors when running the demo, I would like to ask for your help.

This is my script

/home/conda/envs/scf/bin/python -u /home/data/CancerFinder/infer.py --ckp=/home/data/CancerFinder/sc_pretrain_article.pkl --matrix=/home/data/CancerFinder/sample_data_matrix.tsv --out=out.csv

For the first error, I changed from models import model to import models and it continued to run

But for the second question, I didn't find the answer online

Patchouli-M commented 3 months ago

Thank you for your interest. This error seems to indicate that the working directory hasn't been set correctly.

"models" and "args_utils" are two folders within the code, and infer.py needs to import code from these two folders.

If you have downloaded the complete code, I suggest you run the following commands directly on a Linux system:

cd /home/data/CancerFinder
/home/conda/envs/scf/bin/python -u infer.py --ckp=checkpoints/sc_pretrain_article.pkl --matrix=sample_data/sample_data_matrix.tsv --out=out.csv

It's necessary to "cd" to the project folder.

If you are using an IDE or a remote editor (such as VSCode), I would suggest looking into the settings related to the working directory.

xianjieshen commented 2 months ago

I'm really pleased that the author has developed such a useful package; it represents a significant advancement in oncology. I encountered the same issue and resolved it by following the author's instructions: use the cd command in a Linux environment to navigate to the directory where your infer.py is stored. Then download the folders provided by the author, namely "models" and "utils," and save them to this directory. After doing so, you should be able to run it successfully. image