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

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

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

            #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
                  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, 08-06-2026, 07:41 AM
                0 responses
                17 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 08-03-2026, 10:13 AM
                0 responses
                33 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-31-2026, 02:55 AM
                0 responses
                43 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-24-2026, 12:17 PM
                0 responses
                26 views
                0 reactions
                Last Post SEQadmin2  
                Working...