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

IndexError: list index out of range when running amplian.py #36

Closed nickjhathaway closed 7 years ago

nickjhathaway commented 7 years ago

When running amplian.py I get the following error and I'm not sure what is causing it.

Traceback (most recent call last):
  File "/data/home/hathawan/shorah-install/bin/amplian.py", line 429, in <module>
    args.s, args.region, args.diversity)
  File "/data/home/hathawan/shorah-install/bin/amplian.py", line 344, in main
    h = list(open('coverage.txt'))[0]
IndexError: list index out of range

I'm running the following command

amplian.py -b EBNA3cN1MIDJijoye-d1-EBV-1.sorted.bam -f renamed_NC_007605.1.fasta

And I have put all my files including output from amplian.py here, http://bib8.umassmed.edu/~hathawan/shorah/

Any help would be appreciated, thanks!

Nick

ozagordi commented 7 years ago

Hi Nick.

Try to specify the region. I noticed in your bam file that you only have coverage at the very end of the reference. I managed to start it with this command line (replace with your file name)

amplian.py -b EBNA3cN1MIDJijoye-d1-EBV-1.sorted.bam -r ebv0:86264-86674 -f your_reference.fasta

Nevertheless, it seems that you have all reads in the same orientation, and this will make all detected SNVs invalid. You will find no SNVs in SNVs_0.010000_final.csv, but they are listed in raw_snv.txt. Your sample seems quite heterogeneous, though.

screen shot 2017-10-26 at 11 28 54

Please keep in mind that the different modes are described in this page.

Best. Osvaldo

nickjhathaway commented 7 years ago

Apologies, I had read the part of the local mode finding the area with the highest diversity and I thought it would take into account only regions that had coverage. Since I only have one region I thought it would find this automatically.

-Nick

nickjhathaway commented 7 years ago

Sorry quick question, is the region supplied 1-based or 0-based?

Nick

ozagordi commented 7 years ago

Discovery mode must be triggered with the appropriate flag. Barring mistakes, we follow samtools convention for region specification.