SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools flagstat on Tophat generated .bam file rg_gis Bioinformatics 6 02-27-2015 10:35 PM
BWA sam and Samtools sam->bam conversion problem maasha Bioinformatics 6 06-05-2013 08:39 AM
.SAM to .BAM with SAM file header @PG emilyjia2000 Bioinformatics 13 06-14-2011 01:21 PM
NEw to Chip-seq and have .bam/.sam/.bam.bai files... then what? NGS newbie Bioinformatics 11 05-25-2011 08:48 AM
sam to bam kwtennis311 Bioinformatics 2 07-20-2010 01:19 PM

Reply
 
Thread Tools
Old 04-01-2011, 10:09 AM   #1
badhikari
Junior Member
 
Location: East Lansing, MI

Join Date: Jan 2011
Posts: 4
Default bam to sam coversion and flagstat

Hi Everybody,

I converted the Tophat result accepted_hits.bam to .sam using
samtools view accepted_hits.bam > accepted_hits.sam

and now my sam file looks like
SOLEXA1_0001:7:53:1361:1750#0 163 pcu_contig_1 78 255 84M = 139 0 GTTCGCGTATTTTGGTCGAAATGCTAAAAGCTCAACAGCCTTTGCGATACATGCGTCGTCACTAGGGTACAATGCCAGCCATGCHHHHHIHHHHDHHHHGHHHHHHHGHHHHHHHHGHHEHHHGHHFHDHGHHHHHHGHBHHGHHHHHHHHDHHHDGHBHGHGHHEFG NM:i:0 NH:i:1
SOLEXA1_0001:7:26:430:480#0 99 pcu_contig_1 117 255 84M = 195 0 CTTTGCGATACATGCGTCGTCACTAGGGTACAATGCCAGCCATGCTATTGAGCAAGTTAACAGTTGACATGAAGCTAGATCGCGHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHDHHFHHHHEHHHHHHHHHFHIHHGEFHHHHIIGHHFIHAGH?GGBGFB NM:i:0 NH:i:1
Now when i try to run flagstat, it shows following;

[bam_header_read] EOF marker is absent.
[bam_flagstat_core] Truncated file? Continue anyway.

and the flaststat is

0 in total
0 QC failure
0 duplicates
0 mapped (nan%)
0 paired in sequencing
0 read1
0 read2
0 properly paired (nan%)
0 with itself and mate mapped
0 singletons (nan%)
0 with mate mapped to a different chr
0 with mate mapped to a different chr (mapQ>=5)

I do not know what i am doing wrong. It could be the way i converted my bam file to sam or something else.
badhikari is offline   Reply With Quote
Old 04-01-2011, 10:52 AM   #2
volks
Member
 
Location: hd.de

Join Date: Jun 2010
Posts: 81
Default

Usage: samtools flagstat <in.bam>

flagstat needs BAM as input. why do you want to convert to SAM in the first place?
volks is offline   Reply With Quote
Old 04-06-2011, 11:46 AM   #3
questioner
Junior Member
 
Location: New Orleans

Join Date: Jun 2009
Posts: 6
Default

Try GUI tool SAMMate. It allows one to convert SAM to BAM and vice versa.

http://sammate.sourceforge.net/
questioner is offline   Reply With Quote
Reply

Tags
bam, flagstat, sam

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 03:26 PM.


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