Open kmgibson opened 4 years ago
Also add more to the error message - pertaining to this error:
(haphpipe) [uzma_rentia@hth001 Uzma_hp]$ haphpipe pairwise_align --amplicons_fa final.fna --ref_fa HIV_B.K03455.HXB2.fasta --ref_gtf HIV_B.K03455.HXB2_2.gtf
[--- pairwise_align ---] Using temporary directory /tmp/tmpHP_pairwise_alignr6red5e0
Traceback (most recent call last):
File "/GWSPH/home/uzma_rentia/.conda/envs/haphpipe/lib/python3.7/site-packages/haphpipe/stages/pairwise_align.py", line 117, in pairwise_align
gl = ampdict[(aid['ref'], aid['reg'])]
KeyError: 'reg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/GWSPH/home/uzma_rentia/.conda/envs/haphpipe/bin/haphpipe", line 8, in <module>
sys.exit(console())
File "/GWSPH/home/uzma_rentia/.conda/envs/haphpipe/lib/python3.7/site-packages/haphpipe/haphpipe.py", line 174, in console
args.func(**sysutils.args_params(args))
File "/GWSPH/home/uzma_rentia/.conda/envs/haphpipe/lib/python3.7/site-packages/haphpipe/stages/pairwise_align.py", line 119, in pairwise_align
poss_gl = [t for t in ampdict.keys() if t[1] == aid['reg']]
File "/GWSPH/home/uzma_rentia/.conda/envs/haphpipe/lib/python3.7/site-packages/haphpipe/stages/pairwise_align.py", line 119, in <listcomp>
poss_gl = [t for t in ampdict.keys() if t[1] == aid['reg']]
KeyError: 'reg'
This error was because the output file used as the amplicon fasta did not contain amplicons - just a single large sequence. Need to also address this in the manual.
I need to double check the GTF form and make sure it is in multiple of threes, and take this possibility into account into the code.