Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ggould
    Junior Member
    • Feb 2014
    • 1

    #1

    How to get reads for a particular splice junction – TopHat and BEDTools

    Does anyone have a quick way of getting all the reads that correspond to a particular splice junction? I’ve mapped my RNA-seq data with TopHat, made a new .bam file with only reads that span junctions (N in the cigar string), and run intersectBed with this new junction-only bam file and the junctions.bed file created by TopHat. The issue I’m encountering is if an intron has an alternative splice site, say this particular intron has only 5’ splice site and two alternative 3’ splice sites, a read will “intersect” this junction if it crosses the 5’ss but that read might not belong to that junction because it uses a different 3’ splice site. Is there a quick way of pulling out only the reads that span a particular junction using BEDTools (or another program) or am I better off doing this myself in python? Thanks!
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    How about the "samtools view region" option?

    Code:
    Usage:   samtools view [options] <in.bam>|<in.sam> [region1 [...]]
    
    Options: -b       output BAM
             -h       print header for the SAM output
             -H       print header only (no alignments)
             -S       input is SAM
             -u       uncompressed BAM output (force -b)
             -1       fast compression (force -b)
             -x       output FLAG in HEX (samtools-C specific)
             -X       output FLAG in string (samtools-C specific)
             -c       print only the count of matching records
             -B       collapse the backward CIGAR operation
             -@ INT   number of BAM compression threads [0]
             -L FILE  output alignments overlapping the input BED FILE [null]
             -t FILE  list of reference names and lengths (force -S) [null]
             -T FILE  reference sequence file (force -S) [null]
             -o FILE  output file name [stdout]
             -R FILE  list of read groups to be outputted [null]
             -f INT   required flag, 0 for unset [0]
             -F INT   filtering flag, 0 for unset [0]
             -q INT   minimum mapping quality [0]
             -l STR   only output reads in library STR [null]
             -r STR   only output reads in read group STR [null]
             -s FLOAT fraction of templates to subsample; integer part as seed [-1]
             -?       longer help

    Comment

    • sdriscoll
      I like code
      • Sep 2009
      • 436

      #3
      what if you focused on the two exons on either side of the intron rather than the intron itself? certainly if a spliced alignment hits BOTH of those exons you've got a winner. in fact if you even know the coordinates of the intron you could just fake a bed file with two rows with 10 or 20bp on either side of the intron and then intersect that with your BAM using 'bedtools intersect' then parse for cases were a single read hit both of them.
      /* Shawn Driscoll, Gene Expression Laboratory, Pfaff
      Salk Institute for Biological Studies, La Jolla, CA, USA */

      Comment

      Latest Articles

      Collapse

      • 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, detection...
        Today, 06:46 AM
      • 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

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 10-28-2026, 09:57 AM
      0 responses
      22 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-28-2026, 09:51 AM
      0 responses
      14 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 11:13 AM
      0 responses
      67 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      47 views
      0 reactions
      Last Post SEQadmin2  
      Working...