Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Calculating max coverage per gene from BAM + GFF

    I have a BAM file with alignments and a GFF file with non-overlapping gene annotation. Using these, I would like to find out what the highest coverage for each gene was.

    In other words, I am looking for something like HTSeq-count (http://www-huber.embl.de/users/ander...doc/count.html), except I want the max coverage of reads to be returned instead of the total count of reads.

    Is there any tool that can do something like this or am I stuck writing my own script?

  • #2
    Do you mean that you want the maximum per-base coverage in a given gene? I'm not familiar with any tool specifically for that, but the simplest route to making one would probably involve parsing the output from "samtools mpileup", which can be told to only output regions of interest.

    Comment


    • #3
      Yes, exactly. Thanks for the suggestion to use mpileup - isn't that usually just used for SNP calling though?

      Comment


      • #4
        Yeah, but it also gives the per-base depth (the rest can just be ignored). The benefit of this is that it makes filtering by MAPQ and base phred score easy simple, since samtools will do that part for you. Just make sure to adjust the -d parameter to a large value!

        Comment


        • #5
          In case anybody ever stumbles upon this - my solution ended up being to use bedtools genomecov to calculate the per-base genome coverage, bedtools intersect to overlap the genome coverage with my gff file and then awk to find the max coverage per feature.

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Understanding Genetic Influence on Infectious Disease
            by seqadmin




            During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

            Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
            09-09-2024, 10:59 AM
          • seqadmin
            Addressing Off-Target Effects in CRISPR Technologies
            by seqadmin






            The first FDA-approved CRISPR-based therapy marked the transition of therapeutic gene editing from a dream to reality1. CRISPR technologies have streamlined gene editing, and CRISPR screens have become an important approach for identifying genes involved in disease processes2. This technique introduces targeted mutations across numerous genes, enabling large-scale identification of gene functions, interactions, and pathways3. Identifying the full range...
            08-27-2024, 04:44 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 09-11-2024, 02:44 PM
          0 responses
          11 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 09-06-2024, 08:02 AM
          0 responses
          145 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 09-03-2024, 08:30 AM
          0 responses
          152 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 08-27-2024, 04:40 AM
          0 responses
          161 views
          0 likes
          Last Post seqadmin  
          Working...
          X