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
                  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, 10-22-2026, 11:13 AM
                0 responses
                23 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 10:48 AM
                0 responses
                20 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...