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

quant.py error: FileNotFoundError: [Errno 2] No such file or directory: 'dat/ref/hla.p' #101

Open
ahmadalajami opened this issue Jan 20, 2023 · 1 comment

Comments

@ahmadalajami
Copy link

ahmadalajami commented Jan 20, 2023

Hi,

Thank you for creating this tool.

I have read other similar issues but I could not find an answer to my problem.

I have followed the steps written in your vignette and everything works just fine until I try running quant.py

From the data generated in test, I run quant.py as the following:
mkdir test/quant
arcasHLA quant --ref dat/ref/hla -o test/quant/ test/output/test.extracted.1.fq.gz test/output/test.extracted.2.fq.gz
--> File "/home/arcasHLA-master/scripts/quant.py", line 187, in
with open(indv_p, 'rb') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'dat/ref/hla.p'

This is indeed true, because in the dir dat/ref, there's hla.p.json not hla.p (I think this has something to do with you switching from pickle to json?)

Even if I omit the optional parameter --ref dat/ref/hla, I get:
--> File "/home/arcasHLA-master/scripts/quant.py", line 177, in
indv_idx = args.ref + '.idx'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Which also makes sense because by default you're setting args.ref = None

Am I doing something wrong? If I were to use the data generated in test, how would you run quant.py? What should I write after --ref?

Thank you for your help.

@JaeungJayJang
Copy link

JaeungJayJang commented Nov 21, 2023

you probably found the answer at this point, but I will still answer here as I was looking for the solution as well and probably there will be some people who may look for the answer as well.

the solution can be found here: roseorenbuch/arcasHLA-quant#6

you first run genotype option to get test.genotype.json file.
then you run customize option with the test.genotype.json file to generate ref which will create ref folder with .idx file and .p files.
then supply the folder with the base name to quant.

./arcasHLA customize --transcriptome chr6 --genotype test.genotype.json -o ref`  // generate ~/ref/test.idx + ~/ref/test.p
./arcasHLA quant --ref ~ref/test -t 8 -o /output r1.fastq.gz r2.fastq.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants