peterjc/maf2sam — Issue #2: IonTorrent fail?
Author: wwood
Created: 2012-02-26 07:44:08+00:00
State: open

Hi there,

I'm attempting to use your maf2sam.py script with some ion torrent data, and came across 2 problems. Firstly there was a disconnect between the mira and sam re the way to say the sequences were from iontorrent:

$ time maf2sam.py ../metagenome2_assembly/metagenome2_d_results/metagenome2_out.unpadded.fasta ../metagenome2_assembly/metagenome2_d_results/metagenome2_out.maf >metagenome2.mira.sam
Traceback (most recent call last):
File "/srv/whitlam/bio/apps/sw/maf2sam/0.1.01/maf2sam/maf2sam.py", line 267, in
raise ValueError("Sequencing technology (ST line) %r not supported in SAM/BAM" % tech)
ValueError: Sequencing technology (ST line) 'IonTor' not supported in SAM/BAM

real	1m17.074s
user	1m15.530s
sys	0m1.450s

I figured I'd have a go at fixing this - implemented in https://github.com/wwood/maf2sam/commit/50d6939a4f3a103664f9c4b4bd2a0b4adb8edddd - this seemed to get past the first error.

$ time ~/git/maf2sam/maf2sam.py ../metagenome2_assembly/metagenome2_d_results/metagenome2_out.unpadded.fasta ../metagenome2_assembly/metagenome2_d_results/metagenome2_out.maf >metagenome2.mira.sam
[maf2sam] Identified 1 read groups
[maf2sam] No orphaned paired reads
[maf2sam] Done

real	13m23.193s
user	13m19.460s
sys	0m3.190s

However, I think I'm still missing something. Any ideas?

$ time samtools view -bS metagenome2.mira.sam >metagenome2.mira.bam
[samopen] SAM header is present: 144202 sequences.
Parse error at line 144206: invalid CIGAR character
Aborted

real	0m1.426s
user	0m1.070s
sys	0m0.220s
$ sed -n '2,2p' metagenome2.mira.sam
@CO	Converted from a MIRA Alignment Format (MAF) file
$ sed -n '144206,144206p' metagenome2.mira.sam |head -n1
NP1DY:100:1019	0	metagenome2_c1	1	255	20S97=54S	*	0	0	TCAGCTGGCACCACGTACAGGGCAAAATCGTCATACGCCGCGAAACAATTTGTGGGGTTCACTCCCCCCAACGCCCCGGTATTGAAGAAAACACCAGGATACTTGTTGGTGTCCGCATCACCGACTGCCCATGAGAGGCCTGAGACGCGACCAAGGCACACAGGGGATAGG	0+3;8<<.838..09698130(0.00*221:7<78;15/2:7::-::0;<++/99<*8,855.77767)56>;@@@.;49,0&05.5866*66625:5<<:7:69;3926637.3257457/7226669.72.***0(0(./1120****-)0)0-///,/*+--%*/11-	RG:Z:IonTor