cbg-ethz / shorah

Repo for the software suite ShoRAH (Short Reads Assembly into Haplotypes)
GNU General Public License v3.0
41 stars 14 forks source link

Shorah: UnboundLocalError: local variable 'end' referenced before assignment #78

Open ptapiaisp opened 4 years ago

ptapiaisp commented 4 years ago

Hi, I am running shorah (installed with conda) and I am getting an error, my command line is:

shorah shotgun -b my_bam.bam -f CoV.fasta -a 0.1 -w 201 -x 100000 -c 10 -r CoV:1-29903

Error is: Traceback (most recent call last): File "/miniconda3/bin/shorah", line 14, in main() File "/miniconda3/lib/python3.7/site-packages/shorah/cli.py", line 196, in main args.func(args) File "/miniconda3/lib/python3.7/site-packages/shorah/cli.py", line 75, in shotgun_run shotgun.main(args) File "/miniconda3/lib/python3.7/site-packages/shorah/shotgun.py", line 452, in main runlist = win_to_run(alpha, seed) File "/miniconda3/lib/python3.7/site-packages/shorah/shotgun.py", line 336, in win_to_run del end UnboundLocalError: local variable 'end' referenced before assignment

any idea?

DrYak commented 4 years ago

Hum, this is intriguing: I haven't met this error message before. Looks like ShoRAH has trouble parsing back the windows files it has generated -- the coverage.txt file seems empty, something might have gone wrong when dividing the alignment BAM into overlapping windows.

Could you please provide your CoV.fasta and my_ba.bam files, so I can try replicating the problem and investigate ?

Or at least could you provide the content of the files shorah.log and coverage.txt that were producing when running ShoRAH, so we investigate what has happened ?

(Alternatively, you can also have a look at the V-pipe pipeline, that we also use to investigate SARS-CoV-2. Internally it also uses ShoRAH2 for SNV calling and local per-window haplotype reconstruction, but might be a bit easier to use, see this tutorial )