Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Xespok
    Junior Member
    • Jan 2014
    • 2

    #1

    Extracting unmapped pairs of mapped reads from a particular chromosomal position

    Hi,

    I would like to pool the unmapped pairs of mapped reads to a particular chromosomal location.

    Many forum posts address the question of extracting read pairs with one or both reads unmapped using samtools view -f4 -F8 and -f8 -F4 or -f12 combinations. For the whole genome these work well.

    But if I try to define a location to narrow down to reads in a particular chromosomal location for example chr1:1-1000, I end up with only the mapped reads in the resulting bam file, the unmapped pairs disappear.

    One can get the header info of the resulting file and than go back to the bam file, convert it to some more readable format, and using this information get the unmapped pair information with custom scripts, but with a several GB file this is very slow. Since this needs to be performed several thousand times, this would take ages.

    Can anyone suggest an easier way to accomplish this task?
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Just script something with python/perl/whatever-language-you-prefer. If that's not fast enough there's a C API for samtools that's pretty convenient. Those would allow a single pass through the file. One word of advice would be to process reads as pairs, rather than relying on the PNEXT field of unmapped reads (since whether the mate really falls into your target region isn't always discernible from that).

    Comment

    • Xespok
      Junior Member
      • Jan 2014
      • 2

      #3
      Thanks, that is what I feared. Unfortunately, my scripting abilities are not sufficient for applying any C API at this moment.

      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...
        Yesterday, 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
      29 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-28-2026, 09:51 AM
      0 responses
      18 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 11:13 AM
      0 responses
      71 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      48 views
      0 reactions
      Last Post SEQadmin2  
      Working...