Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lalit
    Junior Member
    • May 2013
    • 3

    #1

    Samtools view -c Readcount Issue

    I'm using samtools to determine the total number of reads in a uniquely large bam file as shown below. I'm having a hard time interpreting the result. Anyone else receive a negative read count from samtools view -c before?

    $ samtools view -c /run/media/data/Enclosure3/mergedcohort.bam
    -1203401967
  • sdriscoll
    I like code
    • Sep 2009
    • 436

    #2
    Must be an overflow of whatever type they are using in the code. In other words the actual count is larger than what they designed the code to handle.
    /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
    Salk Institute for Biological Studies, La Jolla, CA, USA */

    Comment

    • Lalit
      Junior Member
      • May 2013
      • 3

      #3
      Is there a reference that would indicate what the maximum count limit is? Would help with converting the overflow into a count. I've tried the samtools manual at sourceforge with no luck.

      Comment

      • sdriscoll
        I like code
        • Sep 2009
        • 436

        #4
        If you can read code that seems to be the best reference for samtools. I can take a look unless somebody chimes in with a real answer. Exactly how big is this bam file anyway? Even with a 32 bit unsigned int you should be able to count way higher than any total number of reads I've ever heard of in an experiment.
        /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
        Salk Institute for Biological Studies, La Jolla, CA, USA */

        Comment

        • Lalit
          Junior Member
          • May 2013
          • 3

          #5
          Its huge. The folks who did the sequencing said to expect well over 2E9 reads. (yep -- billions...)

          Comment

          • sdriscoll
            I like code
            • Sep 2009
            • 436

            #6
            You could try this one...

            Code:
            samtools view file.bam | wc -l
            See if that fails.
            /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
            Salk Institute for Biological Studies, La Jolla, CA, USA */

            Comment

            Latest Articles

            Collapse

            • kinpict.com
              Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by kinpict.com
              The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
              Today, 06:37 PM
            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2





              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
              10-30-2026, 06:46 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 11-12-2026, 07:59 AM
            0 responses
            27 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-05-2026, 09:25 AM
            0 responses
            35 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 11-03-2026, 11:54 AM
            2 responses
            56 views
            0 reactions
            Last Post kinpict.com  
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            175 views
            0 reactions
            Last Post SEQadmin2  
            Working...