SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
sam to bam conversion error, no @SQ lines in the header, missing header? efoss Bioinformatics 17 12-03-2015 04:28 AM
error in picard (SAM validation error) dongshenglulv Bioinformatics 3 07-05-2013 12:58 PM
samtools: parse error in SAM to BAM conversion chrisW Bioinformatics 12 01-14-2013 06:16 PM
Error in bowtie's sam output? burt Bioinformatics 11 11-25-2012 03:53 PM

Reply
 
Thread Tools
Old 10-20-2011, 01:57 AM   #1
manore
Member
 
Location: paris

Join Date: Jun 2011
Posts: 19
Default error with sam output ->Parse error at line xxxxx: missing colon in auxiliary data

Hello,

I would like to import SAM to BAM.

I mapp my data using smalt and I obtain SAM output (fichier.sam)

My SAM file doesn't contain the header so I do this but I get a message error.

Someone can help me?

samtools faidx file.fasta

#This generates a BAM-compatible
#filel.fasta.fai

#Next, generate the actual .bam file (-t can be skipped if excluding reference data):
samtools view -bt file.fasta.fai fichier.sam -o fichier.bam
[sam_header_read2] 13 sequences loaded.
Parse error at line xxxxx: missing colon in auxiliary data
Aborted
manore is offline   Reply With Quote
Old 10-20-2011, 03:36 AM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,541
Default

Is that really an xxxxx in the error message, or an actual line number? If it is an line number, can you show us that line from the SAM file?
maubp is offline   Reply With Quote
Old 10-20-2011, 04:21 AM   #3
manore
Member
 
Location: paris

Join Date: Jun 2011
Posts: 19
Default

Hi,

This is the line number :

[sam_header_read2] 13 sequences loaded.
Parse error at line 2171068307: missing colon in auxiliary data
Aborted

sed -n 2171068307p file
HISEQxxxxx#NGACCA 4 * 0 0 * * 0 0 * * AS

Last edited by manore; 10-20-2011 at 04:24 AM.
manore is offline   Reply With Quote
Old 10-20-2011, 04:57 AM   #4
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,541
Default

Great. Using the [ code ] tags (via the # icon in the forum's advanced editor), that's:
Code:
HISEQxxxxx#NGACCA	4	*	0	0	*	*	0	0	*	*	AS
Column 12 is just "AS", which is not a valid SAM/BAM tag. The AS tag is normally the alignment score, and should be something like AS:i:123 instead (i for integer).

Is this the last line of the file by any chance? If so it probably got truncated.
maubp is offline   Reply With Quote
Old 10-20-2011, 11:57 PM   #5
manore
Member
 
Location: paris

Join Date: Jun 2011
Posts: 19
Default

Hi maubp,

Thanks so much.
2171068307 correspond to the last line of my file.

After running smalt, I obtain this message : Segmentation fault. Perhaps smalt stop due to a lack of space on my disk
I will run smalt
manore is offline   Reply With Quote
Old 04-28-2012, 07:32 AM   #6
roll
Member
 
Location: UK

Join Date: Aug 2009
Posts: 38
Default Parse error at line 55: missing colon in auxiliary data

Hi,
i am having the same problem.
it says:

[samopen] SAM header is present: 25 sequences.[sam_read1] reference 'chr1' is recognized as '*'.
Parse error at line 55: missing colon in auxiliary data
Abort

I checked line 55 and it is the first line and shows as

HS8_7032:1:1101:1008:128714 163 chr1 1 2 8S18M1D37M12S = 57 131 CCCTAACCTAACCCTAACCCTAACCCAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCTAACCCAA [email protected]?KDHAKHBJGIHFDCC XA:Z:21,-46944230,49M1D26M,3;1,+154,6M1D69M,3;4,+87,6M1D69M,3;15,-100338770,67M1D8M,3; MD:Z:18^T37 RG:Z:22359 XG:i:1 AM:i:2 NM:i:1 SM:i:2 XM:i:0 XO:i:1 XT:A:M

Any suggestions how to fix this?

Thanks,
roll is offline   Reply With Quote
Old 06-11-2012, 10:32 AM   #7
siriuswss
Junior Member
 
Location: Seattle

Join Date: Jun 2012
Posts: 2
Default Same problem

I have the same problem in converting from SAM to BAM format.

> samtools view -bS WT.sam > WT.bam
[samopen] SAM header is present: 17 sequences.
Parse error at line 20: missing colon in auxiliary data
Abort

Line 20 is the first line after the header in SAM.

@PG ID:Bowtie VN:0.12.5 CL:"bowtie -p 5 -3 40 --solexa1.3-quals -X 50000000 --un s_3_unaligned.txt -S S_cervisae_with_mt -1 ../s_3_1_sequence.txt -2 ../s_3_2_sequence.txt"
HWUSI-EAS95L_0004:3:1:1122:1087#0 77 * 0 0 * * 0 0 AGAACTATTCATAGAGTGAATCGAAAACAATACGAA #################################### XM:i:0

Anybody can help?

Thanks.
siriuswss is offline   Reply With Quote
Old 07-15-2012, 05:53 PM   #8
noms
Junior Member
 
Location: Ohio

Join Date: Apr 2012
Posts: 7
Default

I actually just had this exact same problem and found out that there was an extra '\t' at the end of each line of my record.

Hope this helps
noms is offline   Reply With Quote
Old 02-07-2013, 05:09 AM   #9
visserm
Junior Member
 
Location: South Africa

Join Date: Jun 2011
Posts: 7
Default

Hi there,

I also have a problem converting SAM to BAM with samtools. I used the command...

samtools view -bS file.sam > file.bam

and got the following error...

[samopen] SAM header is present: 17 sequences.
[sam_read1] reference '4' is recognized as '*'.
Parse error at line 27: unmatched CIGAR operation
Abort trap: 6


On inspection of lane 27 I saw that the entry for the read had information missing, shifting the layout of the SAM file for that particular read...


@HD VN:1.0 SO:unsorted
@SQ SN:chr10 LN:38388735
@SQ SN:chr11 LN:40097135
@SQ SN:chr12 LN:36276390
@SQ SN:chr13 LN:39686181
@SQ SN:chr14 LN:34156359
@SQ SN:chr15 LN:55775544
@SQ SN:chr16 LN:23462993
@SQ SN:chr17 LN:27122625
@SQ SN:chr1 LN:36084770
@SQ SN:chr2 LN:40172906
@SQ SN:chr3 LN:39907702
@SQ SN:chr4 LN:25412026
@SQ SN:chr5 LN:37603955
@SQ SN:chr6 LN:30670535
@SQ SN:chr7 LN:31181134
@SQ SN:chr8 LN:35800839
@SQ SN:chr9 LN:37514189
@PG ID:Bowtie VN:0.12.7 CL:"bowtie -v 2 -k 10 --best -S afkr -f file.fasta file.sam"
1 16 chr7 24191077 255 21M * 0 0 GGATTTGATTAACGACTTCAG IIIIIIIIIIIIIIIIIIIII XA:i:0 MD:Z:21 NM:i:0
2 0 chr14 11593810 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:5T0C12 NM:i:2
2 0 chr11 37618952 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:5A4A8 NM:i:2
2 16 chr4 25302083 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:0A0T17 NM:i:2
2 0 chr15 21400937 255 19M * 0 0 ATTCACGTCAGGTTCACCA IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:0T11C6 NM:i:2
2 16 chr4 23221732 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:7T10A0 NM:i:2
2 16 chr2 16031667 255 19M * 0 0 TGGTGAACCTGACGTGAAT IIIIIIIIIIIIIIIIIII XA:i:2 MD:Z:8T3G6 NM:i:2
3 19 4 * 0 0 * * 0 0 GTGCCGGCCGGGGGAAGGACCGG IIIIIIIIIIIIIIIIIIIIIII XM:i:0


The SAM file was created with Bowtie...
bowtie -v 2 -k 10 --best -S <ebwt> -f file.fasta file.sam

This was the case for quite a few reads. I assume that this shift in entry is caused be the read not having a valid alignment, or am I confused. If it is the case how can I tell Bowtie not to included such reads in the SAM file in order for me to be able to generate the BAM file?

Hope some-body can help me
Marike
visserm is offline   Reply With Quote
Old 11-25-2013, 09:26 AM   #10
anaqib2
Junior Member
 
Location: Chicago

Join Date: Nov 2013
Posts: 3
Default

SIMILAR ISSUE
Hi

I am trying to convert .sam file to a .bam file using the following script:-

samtools view -bT Ref_HighCov_B07.fa Reads.sam > Reads.bam

And the error I get is this....

[sam_header_read2] 116 sequences loaded.
[sam_read1] reference '' is recognized as '*'.
Parse error at line 1: missing colon in auxiliary data


Kindly help

Regards
Ankur
anaqib2 is offline   Reply With Quote
Old 11-25-2013, 01:30 PM   #11
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,541
Default

Hi Anjur - it sounds like your SAM file is broken, could you show us what is the first read in your SAM file? If you copy and paste using the [ code ] example [ /code ] tags, it should display here nicely (there is a code button on the advanced view of the forum editor)

Last edited by maubp; 11-25-2013 at 01:30 PM. Reason: typo
maubp is offline   Reply With Quote
Old 11-25-2013, 01:50 PM   #12
anaqib2
Junior Member
 
Location: Chicago

Join Date: Nov 2013
Posts: 3
Default Hi

Hi maubp

i found the issue. The problem is that I was trying to create a .sam file directly (or without using samse/pe). The correct way is to create a .sai file and then convert using samtools samse. Am I right? Please feel free to put up any more suggestion.

Thanks.

Ankur
anaqib2 is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO