Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • How to extract only intronic reads or region from BAM file?

    Hello all,

    I used picard tool CollectRnaSeqMetrics on my RNA-seq fastq files and I found a lot (> 50%) of intronic region.

    I wonder if these intronic regions are equally distributed among the genome or otherwise if my reads are aligned one only few genes.

    How can I see it ? Is there a way to extract only intronic regions from a BAM file ?

    Or maybe there is a way to extract only reads which mapped on intronic regions and see where they're aligned ?

  • #2
    Look at the samtools view -L option. Provide your intronic regions as a bed file and extract reads aligned in those areas into a new file.

    Comment


    • #3
      First, depending on the organism you are working with, it's not totally surprising that a lot of reads map to introns.
      Second, if you have a lot of genes with different isoforms in your sample, the number of "intronic reads" may be influenced by the annotation file you are using.

      There is at least one easy way I can think of to get non-exon regions from a BAM file. bedtools intersect (http://bedtools.readthedocs.org/en/l...intersect.html) allows you to select for reads that don't overlap defined regions (-v parameter). But, you will eventually get the inter-gene reads as well... So you would actually need to define gene regions first (maybe from 5'UTR start to 3'UTR end) and then use this file together with an exon defining file in bedtools intersect -v. This will give you an intron-only file which you can use for detecting unequal mapping distributions.

      Comment


      • #4
        Hello,

        Thank you guys for your answers, all I have is a GTF file with the transcripts coordinates (3th column contains only "CDS" "exon" "start_codon" and "stop_codon") so bedtools intersect with -v option seems more suitable for me.

        Do you think a grep "*_codon" on my transcripts file will be do the trick to have only the gene regions ?

        So if I well understood I should do something like that :
        bedtools intersect -abam -a myfile.bam -b onlyGeneCoordinate.gtf > bamVSgene.bed #first I want the intersection between my reads and genes

        bedtools intersect -v -abam -a bamVSgene.bed -b genesAndTranscripts.gtf > intronOnlyFile.bed #filter the exonic regions

        bedtools intersect -abam -a myfile.bam -b intronOnlyFile.bed > onlyIntrons.bed #finally get only the intronic reads

        I'm not sure the 2nd step will work because there is not intronic regions in the "genesAndTranscripts.gtf" file.

        Comment


        • #5
          Hi how did you get the intron.bed file? I have gff/gtf file with transcripts/exon/gene/cds information snd trying to parse intronic region. any help ?

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Current Approaches to Protein Sequencing
            by seqadmin


            Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
            04-04-2024, 04:25 PM
          • seqadmin
            Strategies for Sequencing Challenging Samples
            by seqadmin


            Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
            03-22-2024, 06:39 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          30 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          32 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          28 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          53 views
          0 likes
          Last Post seqadmin  
          Working...
          X