This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to specify one or more input files in PICARD Mark duplicates tool??? How to specify the paired end reads???

Hello All:

I am trying to remove duplicates using PICARD. I have two individual files - one from control and another from treatment. I would like to remove duplicates from both the files using a single command line. Can anyone suggest me how to specify multiple input files in Picard mark duplicates??? and also how to specify paired end reads?? Am really confused.

Thanks in advance.

next-gen alignment assembly chip-seq

1 answer

Picard MarkDuplicates only identifies and marks optical/PCR duplicates from an alignment file in SAM/BAM format. It does not accept 'raw' unaligned reads.

To identify and remove duplicates in an aligned BAM file using Picard and SAMtools, use:

samtools sort MySample_Aligned.bam -o MySample_Aligned_Sorted.bam

java -jar MarkDuplicates.jar INPUT=MySample_Aligned_Sorted.bam OUTPUT=MySample_Aligned_Sorted_PCRDupes.bam ASSUME_SORTED=true METRICS_FILE=MySample_Aligned_Sorted_PCRDupes.txt

samtools index MySample_Aligned_Sorted_PCRDupes.bam

samtools view -b -F 0x400 MySample_Aligned_Sorted_PCRDupes.bam > MySample_Aligned_Sorted_PCRDupesRemoved.bam

samtools index MySample_Aligned_Sorted_PCRDupesRemoved.bam

For removing these from FASTQ files, see here: Removing PCR duplicates from .fastq without .bam alignment

Sorry, may be am not clear with my question. I have two SAM/BAM files - one from control and another one from treatment. So, now as i am interested in marking and removing duplicates from SAM/BAM files using PICARD, i would like to know how to specify multiple single end SAM/BAM files and also paired end files in a command line.

You can only remove duplicates from one sample at a time. If you want to do it on a few files, set up a loop in BASH (or some other shell with which you are familiar).

Log in to answer this question.