Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • finswimmer
    Member
    • Oct 2016
    • 60

    #1

    Questions concerning samtools bedcov

    Hello,
    I have some question concerning samtools bedcov to which I didn't found answers until now.

    1. Does bedcov ignore reads marked as PCR/optical duplicates when calculating the coverage?

    2. It seems that bedcov needs the index bam file. Right?
    So I have a batch of bam files in which pcr duplicates are not flagged. I need to run PicardTools MarkDuplicates on them. I would like to pipe the output directly to bedcov, but because the output have no index it doesn't work. Is there a way to pipe to bedcov without creating intermediate files?

    Thanks for your help.

    fin swimmer
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    1. This is completely undocumented, but it skips marked duplicates, entries marked as "unaligned", secondary alignments, and alignments marked as QC failed (bit 512, which is rarely seen).
    2. Correct, you need to "samtools index" the file first.

    There's no way for you to pipe into samtools bedcov.

    Comment

    • HESmith
      Senior Member
      • Oct 2009
      • 512

      #3
      Point of clarification; the BAM needs to be sorted before indexing (use samtools 'sort').

      Comment

      • finswimmer
        Member
        • Oct 2016
        • 60

        #4
        Thank you all for your answers.

        It's a pitty that I cannot pipe to bedcov. So I have to write a small shell script that do all neccessary steps and clean up the intermediate files afterwards.

        Do I have to sort bam files everytime I manipulated (markduplicateds, using samtools view ...) them? Or is it just to be sure, that they are sorted?

        fin swimmer

        Comment

        • dpryan
          Devon Ryan
          • Jul 2011
          • 3478

          #5
          You only need to sort a BAM file once. Marking duplicates/filtering/etc. on a sorted file results in another sorted file. Just reindex it if appropriate.

          Regarding needing to write a script to streamline things, I think many of us find snakemake a convenient way to do that (it can handle removing intermediate files for you).

          Comment

          • finswimmer
            Member
            • Oct 2016
            • 60

            #6
            Originally posted by dpryan View Post
            Regarding needing to write a script to streamline things, I think many of us find snakemake a convenient way to do that (it can handle removing intermediate files for you).
            Thanks for that hint. Didn't know it before. It looks very useful. I will have a closer look at it.

            fin swimmer

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
              by SEQadmin2



              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

              Despite this, “CRISPR helped turn genome editing from a specialized technique into
              ...
              07-31-2026, 11:01 AM
            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Today, 10:05 AM
            0 responses
            3 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 08-13-2026, 12:22 PM
            0 responses
            31 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 08-11-2026, 10:35 AM
            0 responses
            24 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 08-06-2026, 07:41 AM
            0 responses
            38 views
            0 reactions
            Last Post SEQadmin2  
            Working...