sanger-pathogens / iva

de novo virus assembler of Illumina paired reads
http://sanger-pathogens.github.io/iva/
Other
52 stars 18 forks source link

samtools errors caused by mapping.py #59

Closed koppk closed 8 years ago

koppk commented 8 years ago

Hi all,

changing these two lines in mapping.py seems to prevent an error thrown by samtools which made IVA runs exit.

old:

    #sort_cmd = 'samtools sort -@' + str(threads) + ' -m ' + str(thread_mem) + 'M ' + intermediate_bam + ' ' + out_prefix

new:

    sort_cmd = 'samtools sort -@' + str(threads) + ' -m ' + str(thread_mem) + 'M ' + intermediate_bam + ' -o' + final_bam

old:

    #index_cmd = 'samtools index ' + out_prefix + '.bam'

new:

    index_cmd = 'samtools index ' + final_bam

Cheers, Katharina

martinghunt commented 8 years ago

Hi Katharina,

What version of samtools are you using? It's on the to-do list to support 1.3 (see issue #57).

Thanks, Martin

koppk commented 8 years ago

Hi Martin, it's samtools Beta Release 1.3 (15 December 2015)

I found this in the file NEWS of that release:
Noteworthy changes in samtools:
* The obsolete "samtools sort in.bam out.prefix" usage has been removed.
  If you are still using -f, -o, or out.prefix, convert to use -T PREFIX
  and/or -o FILE instead.  (#295, #349, #356, #418, PR #441; see also
  discussions in #171, #213.)
It seems with the above mentioned changes in mapping.py, though.
I really appreciate having discovered IVA, as I am trying to assemble NGS runs from "very difficult" metagenomics samples (low concentration, probably partially degraded viral RNA, dominating host mRNA ...) and so far IVA worked best ... 
Thanks,
Katharina 
martinghunt commented 8 years ago

Hi Katharina,

Yes, the plan is to support samtools 1.3, but keep support for older versions as well (that don't have the -o option), so it's a little more work than just changing those two lines.

Glad it's working well!

Thanks, Martin

martinghunt commented 8 years ago

This is now fixed in the new version 1.0.5, whcih supports the new and old samtools. Thanks @satta.