Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • badhikari
    Junior Member
    • Jan 2011
    • 4

    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.
  • volks
    Member
    • Jun 2010
    • 80

    #2
    Usage: samtools flagstat <in.bam>

    flagstat needs BAM as input. why do you want to convert to SAM in the first place?

    Comment

    • questioner
      Junior Member
      • Jun 2009
      • 6

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

      Comment

      Latest Articles

      Collapse

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 10:09 AM
      0 responses
      10 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-04-2026, 08:59 AM
      0 responses
      19 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-02-2026, 12:03 PM
      0 responses
      26 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 06-02-2026, 11:40 AM
      0 responses
      21 views
      0 reactions
      Last Post SEQadmin2  
      Working...