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

            • SEQadmin2
              Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
              by SEQadmin2



              Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

              Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
              ...
              10-14-2026, 09:55 AM
            • SEQadmin2
              New Genomics Technologies Take Aim at Long-Standing Limits
              by SEQadmin2


              Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

              We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
              ...
              09-28-2026, 10:25 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 10-22-2026, 11:13 AM
            0 responses
            30 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 10:48 AM
            0 responses
            22 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-15-2026, 10:52 AM
            0 responses
            39 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-14-2026, 05:39 AM
            0 responses
            45 views
            0 reactions
            Last Post SEQadmin2  
            Working...