Re: [Bio-bwa-help] error on samtools view
Status: Beta
Brought to you by:
lh3lh3
|
From: jbr950 <jb...@gm...> - 2013-07-05 14:24:30
|
Thanks for the reply!
I removed the -r flag altogether and I'm now able to call samtools view
without the error - thanks!
I'm now going to include the commands I had used earlier which created the
error:
Here is a bit of one of my input fastq files:
gunzip -c Sample_1.fastq.gz | head
@D3B4KKQ1:406:H0YE0ADXX:2:1101:1198:2135 1:N:0:CGATGT
TTCTAATATGATGGAGACATTCTGAATCTTAGACTTTCTGAGGGGGTTTAATGACCACTAGAGNTTNTCCTCATATTCAGTCCAGTTTAATACTGTATGTC
+
@@@DFDBEDHHGHIIGCCFHIIIIIHHIIIGIGIHIIIIIFHIIIIHIIGIHIGIIGGD?E@
>#,5#,,5==>A>CDCDCDCCCCCCEDCCDACDEEEEEC
@D3B4KKQ1:406:H0YE0ADXX:2:1101:1230:2139 1:N:0:CGATGT
TGACTGTTAGTTGTTTTTTCAAGTCTATATAAACATTTCAACAGATCACAAAGAAAACATTTATCTCTTCGGTCCTCGCAAGAGAAGTCAAAGGAACTTTT
+
@@;BDDDDFFFFFFGFADF:AFHFIHEH?FGI9<:DBGCDGCFGD4DFIFFIE8BDFFIFIIIIFF=@EEEE5=-?DD@
>??BB?59>BDBBBB9ABB>BB
@D3B4KKQ1:406:H0YE0ADXX:2:1101:1213:2248 1:N:0:CGATGT
TGCTGTGCAGTGTTTGCTAAAGAGCCTGATTCCTGGCATGTGAAAGATAACCGTGTGATGCAGTTGNCCAGGAAGGAATGGATCCAGTTCATGGTGGAGGC
Then I am calling:
/ifs/home/c2b2/rr_lab/shares/bin/bwa-0.6.2/bwa-0.5.9rc1/bwa aln
${ref} Sample_1.fastq.gz -t 4 > sample_1.sai
/ifs/home/c2b2/rr_lab/shares/bin/bwa-0.6.2/bwa-0.5.9rc1/bwa aln
${ref} Sample_2.fastq.gz -t 4 > sample_2.sai
after which I had used:
/ifs/home/c2b2/rr_lab/shares/bin/bwa-0.6.2/bwa-0.5.9rc1/bwa sampe -s -r
"@RG\tID:$name\tLB:$name\tSM:$name\tPL:ILLUMINA" ${ref} sample_1.sai
sample_2.sai $fastq1 $fastq2 > ${samOutput}
I have been using this template (without paying attention to -r flag in the
call to sampe) for a while and it had produced usable output in the past.
Removing the -r flag produces a sam file that works.
Thanks
On Fri, Jul 5, 2013 at 5:19 AM, John Marshall <jm...@sa...> wrote:
> On 5 Jul 2013, at 04:45, jbr950 wrote:
> > samtools view -bS file.sam > file.bam
> > [samopen] SAM header is present: 93 sequences.
> > Parse error at line 95: missing colon in auxiliary data
> > Aborted
> >
> > head -96 file.sam | tail -5
> >
> >
> > @SQ SN:chrUn_gl000226 LN:15008
> > @SQ SN:chr18_gl000207_random LN:4262
> > @RG ID: LB: SM: PL:ILLUMINA
> > D3B4KKQ1:406:H0YE0ADXX:2:1101:1198:2135 89 chr8 124262197
> 37 101M = 124262197 0
> GACATACAGTATTAAACTGGACTGAATATGAGGANAANCTCTAGTGGTCATTAAACCCCCTCAGAAAGTCTAAGATTCAGAATGTCTCCATCATATTAGAA
>
> CEEEEEDCADCCDECCCCCCDCDCDC>A>==5,,#5,#>@E?DGGIIGIHIGIIHIIIIHFIIIIIHIGIGIIIHHIIIIIHFCCGIIHGHHDEBDFD@@@
> RG:Z: XT:A:U NM:i:2 SM:i:37 AM:i:0 X0:i:1 X1:i:0 XM:i:2 XO:i:0
> XG:i:0 MD:Z:34C2G63
>
> The error message is (not especially clearly!) complaining about the empty
> RG:Z: tag in your SAM records. This is technically invalid in the current
> SAM specification (though there is no real reason for disallowing it, and I
> would mildly advocate for relaxing that), and samtools rejects it. Empty
> header fields as in your faulty-looking @RG header are also technically
> invalid, though samtools is not detecting that.
>
> Unless there is another step in your pipeline setting it, the read group
> tag is set via bwa's -r option (or -R for bwa mem) and it's not obvious how
> you've managed to get an empty one. If you're setting this via bwa, it
> would be interesting to see the relevant bwa command line (and what version
> of bwa you're using).
>
> John
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research
> Limited, a charity registered in England with number 1021457 and a
> company registered in England with number 2742969, whose registered
> office is 215 Euston Road, London, NW1 2BE.
>
|