Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculating average coverage wih Pysam

    Hi,

    I have to program a program, which calculates each average at each position.

    The idea was that that program was good, but it is too slow. That is why the code must be adapted to get is faster.

    Does someone knows code for that?

  • #2
    I'm not sure what you mean by average, if you talk about each position; do you mean each precise position or some kind of window?

    Have a look at "bedtools coverage" and "bedtools genomecov"; I like to use
    Code:
    bedtools genomecov -bg -split -ibam file.bam > file_coverage.bedgraph
    which gives me a BedGraph; if you use "-d" instead of "-bg" you get the read count at each and every position.

    You can get BEDTools here: http://code.google.com/p/bedtools/
    There is also a python interface for it (pybedtools), but I'm not sure whether it makes sense to use it in this case, haven't really tried it.
    Last edited by arvid; 05-29-2012, 04:36 AM. Reason: added link

    Comment

    Latest Articles

    Collapse

    • seqadmin
      New Genomics Tools and Methods Shared at AGBT 2025
      by seqadmin


      This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

      The Headliner
      The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
      03-03-2025, 01:39 PM
    • seqadmin
      Investigating the Gut Microbiome Through Diet and Spatial Biology
      by seqadmin




      The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
      02-24-2025, 06:31 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 03-03-2025, 01:15 PM
    0 responses
    178 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 02-28-2025, 12:58 PM
    0 responses
    272 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 02-24-2025, 02:48 PM
    0 responses
    656 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 02-21-2025, 02:46 PM
    0 responses
    267 views
    0 likes
    Last Post seqadmin  
    Working...
    X