Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cnash2
    Junior Member
    • Dec 2015
    • 7

    #1

    Running Picard MarkDuplicates on multiple bam files

    Hi everyone,

    I've had a search around and can't find the answer I'm looking for.

    I'm wondering if anyone can tell me if it's possible to run Picard MarkDuplicates on a batch of bam files at once? I have 13 bam files in a single directory and would like to remove duplicates from all files and output 13 new bam files with the duplicates removed.

    Since this is a java based program I wasn't sure if the same rules applied as running samtools for example on a batch of files from the command line.....
  • GenoMax
    Senior Member
    • Feb 2008
    • 7138

    #2
    Are you looking to mark duplicates from all 13 files considered together or just within individual files?

    Comment

    • cnash2
      Junior Member
      • Dec 2015
      • 7

      #3
      Thanks for your reply. I want to remove the duplicates from each of the 13 individual files and produce 13 new individual files that have had the duplicates removed. If that makes sense.....

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7138

        #4
        It would work best if you have access to a cluster. You can start 13 parallel markduplicate jobs. You can use the same procedure (shell script?) for running the jobs from the command line. You should not need to remove those duplicates (http://gatkforums.broadinstitute.org...ove-duplicates).

        Comment

        • cnash2
          Junior Member
          • Dec 2015
          • 7

          #5
          Ah. I don't have access to a cluster right now. So I guess I'll have to do them one by one. So it's not possible to run java programs on a batch of files at once?

          To note, I have to remove duplicates from these ChIP-seq files to comply with previous analyses so that I can make them comparable.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7138

            #6
            Certainly possible to run multiple. You could start all of them but then they would compete for hardware resources on your local machine and get in each others way.

            If you have multiple cores available (and a fast disk, SSD) try starting 3-4 in parallel and see if they all proceed well. Watch for CPU/Disk usage.

            Comment

            • cnash2
              Junior Member
              • Dec 2015
              • 7

              #7
              Ok. Thank you.

              Let's put my mac to the test.......

              Comment

              • colindaven
                Senior Member
                • Oct 2008
                • 417

                #8
                If you don't need to do in parallel, you can sequentially remove duplicates with a shell script like:

                Code:
                ## Save a script.sh, run as "sh script.sh" at least on Linux with bash
                ## 
                
                for i in `ls *.bam`
                
                        do
                        java -jar PicardCommandWhatever input=$i
                
                done

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  The Factors Reshaping Genome Assembly
                  by SEQadmin2



                  When the Human Genome Project declared the human genome finished in 2003, portions of the sequence were still missing, including many of its most repetitive and structurally complex regions.1 Still, for the next two decades, researchers analyzed their sequencing data against the single linear reference that came out of this effort. Released in 2013 as GRCh38, that reference has powered countless discoveries, but it has gaps and cannot capture the genetic diversity of the world’s...
                  11-24-2026, 07:04 AM
                • 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,...
                  10-30-2026, 06:46 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 11-23-2026, 11:11 AM
                0 responses
                39 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 11-17-2026, 06:27 AM
                0 responses
                47 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 11-12-2026, 07:59 AM
                0 responses
                68 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 11-05-2026, 09:25 AM
                0 responses
                68 views
                0 reactions
                Last Post SEQadmin2  
                Working...