Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brace
    Junior Member
    • May 2008
    • 7

    #1

    About Samtools view -L

    Can this function be more efficient when dealing with whole genome alignment, for example 15G bam?

    I had thought that it would use a bam index file, but it didn't.
    Is it useful to build a bam index to the huge bam to accelerate the process?

    Any other suggestion?
    Last edited by Brace; 03-29-2013, 01:04 AM.
  • MBekritsky
    Member
    • Nov 2009
    • 15

    #2
    samtools -L

    Looking at the code for samtools view, it does not appear that the -L flag uses the index to jump to regions specified in a BED file. The -L flag goes through the BAM file line by line and print out lines that overlap with a region in the BED file. Have you tried using the -L flag with a BED file? Does it run slower than you'd like?

    I'm trying to think of a better explanation, but the code looks like it's written to balance lots of random access (via the index) vs retrieving lots of regions--if there are few desired regions relative to the genome size, it's faster to look for the specific region rather than to scan the whole BAM file. If you're looking for lots of regions relative to the genome size, then it's faster to scan through the file line by line and print the lines that overlap your regions of interest.

    I would suggest that depending on how many regions you're looking to retrieve, it may be worth specifying them on the command line if there aren't too many. If you have lots of regions you're looking to retrieve from (I've gone up to a few million before), then the -L flag may be a better choice.

    Comment

    • Brace
      Junior Member
      • May 2008
      • 7

      #3
      Thanks MBekritsky, I've got it.

      Comment

      Latest Articles

      Collapse

      • 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
      • SEQadmin2
        New Genomics Technologies Take Aim at Long-Standing Limits
        by SEQadmin2


        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
        ...
        09-28-2026, 10:25 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, Yesterday, 11:13 AM
      0 responses
      21 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, Yesterday, 10:48 AM
      0 responses
      18 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      36 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      42 views
      0 reactions
      Last Post SEQadmin2  
      Working...