Try GUI tool SAMMate. It allows one to convert SAM to BAM and vice versa.
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
Usage: samtools flagstat <in.bam>
flagstat needs BAM as input. why do you want to convert to SAM in the first place?
Leave a comment:
-
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.
Latest Articles
Collapse
-
by seqadmin
Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.
Long-Read Sequencing
Long-read sequencing has seen remarkable advancements,...-
Channel: Articles
12-02-2024, 01:49 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Today, 08:24 AM
|
0 responses
7 views
0 likes
|
Last Post
by seqadmin
Today, 08:24 AM
|
||
Started by seqadmin, Yesterday, 07:41 AM
|
0 responses
6 views
0 likes
|
Last Post
by seqadmin
Yesterday, 07:41 AM
|
||
Started by seqadmin, 12-11-2024, 07:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by seqadmin
12-11-2024, 07:45 AM
|
||
Started by seqadmin, 12-10-2024, 07:59 AM
|
0 responses
13 views
0 likes
|
Last Post
by seqadmin
12-10-2024, 07:59 AM
|
Leave a comment: