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
samtools sam to bam header mattbawn Bioinformatics 14 06-06-2014 06:23 AM
sort contigs based on fasta header akjones Bioinformatics 3 03-19-2014 11:14 AM
the header of SAM and BAM missing dongshenglulv Bioinformatics 5 10-23-2011 11:44 PM
.SAM to .BAM with SAM file header @PG emilyjia2000 Bioinformatics 13 06-14-2011 12:21 PM

Reply
 
Thread Tools
Old 09-12-2014, 08:24 AM   #1
TKTKTK
Member
 
Location: Guelph, Canada

Join Date: Jan 2014
Posts: 11
Default SAM Header and reference contigs

I've just aligned some MiSeq paired-end reads to a reference assembly generated in Velvet. The assembly has ~12,000 contigs in it, and when I view my alignment sam files, the header section includes information about each contig. However, when I convert my sam files to bam using samtools view, the log information for each conversion states that there are only 2500 sequences read in the SAM header. Anyone know what's happening?
TKTKTK is offline   Reply With Quote
Old 09-13-2014, 04:37 AM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Which version of samtools are you using?
maubp is offline   Reply With Quote
Old 09-13-2014, 11:13 AM   #3
TKTKTK
Member
 
Location: Guelph, Canada

Join Date: Jan 2014
Posts: 11
Default

I'm using 0.1.18.
TKTKTK is offline   Reply With Quote
Old 09-14-2014, 11:52 PM   #4
WhatsOEver
Senior Member
 
Location: Germany

Join Date: Apr 2012
Posts: 215
Default

1) Check whether you really have 2500 or 12000 reference header lines

Code:
grep -E "^@SG" /path/to/your/SamFile.sam | wc -l
2) Post the samtools commands you used and the full log report.

3) Try the latest version of samtools (v1.0)
WhatsOEver is offline   Reply With Quote
Old 09-14-2014, 11:55 PM   #5
WhatsOEver
Senior Member
 
Location: Germany

Join Date: Apr 2012
Posts: 215
Default

1b) Convert your bam file (the one which should only have 2500 seqs in the header) back to sam

Code:
samtools view -h yourBamFile.bam > newSamFile.sam
and count again
WhatsOEver 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 02:48 AM.


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