RabadanLab / arcasHLA

Fast and accurate in silico inference of HLA genotypes from RNA-seq
GNU General Public License v3.0
121 stars 50 forks source link

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

Open ahmadalajami opened 1 year ago

ahmadalajami commented 1 year ago

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 commented 1 year ago

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: https://github.com/roseorenbuch/arcasHLA-quant/issues/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