Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

  • #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


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

      Comment


      • #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


        • #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


          • #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

            • 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
            18 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 10:19 PM
            0 responses
            22 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-10-2024, 09:21 AM
            0 responses
            16 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 04-04-2024, 09:00 AM
            0 responses
            47 views
            0 likes
            Last Post seqadmin  
            Working...
            X