Remove duplicate

= Remove Duplicates = Examines aligned records in the BAM file to locate duplicate reads and remove them. Make a temp directory

mkdir -p ${tmp_folder}_rmdup

Using Picard remove duplicate java -Xmx${heap}m -Djava.io.tmpdir\=${tmp_folder}_rmdup \ -jar ${picard}/MarkDuplicates.jar \ I\=$PWDS/${subjectID}.fxmt.flt.bam \ O\=$PWDS/${subjectID}.rmdup.bam \ M\=$PWDS/${subjectID}.duplicate_report.txt \ VALIDATION_STRINGENCY\=SILENT \ REMOVE_DUPLICATES\=true

Using Picard add group info java -Xmx${heap}m -Djava.io.tmpdir\=${tmp_folder}_rmdup \ -jar ${picard}/AddOrReplaceReadGroups.jar \ RGLB\=${subjectID}.fastq \ RGPL\=Illumina \ RGPU\=GRP1 \ RGSM\=GP1 \ I\=$PWDS/${subjectID}.rmdup.bam \ O\=$PWDS/${subjectID}.rmdup.grp.bam \ SORT_ORDER\=coordinate \ CREATE_INDEX\=true \ VALIDATION_STRINGENCY\=SILENT

rename mv -f $PWDS/${subjectID}.rmdup.grp.bam   $PWDS/${subjectID}.rmdup.bam mv -f $PWDS/${subjectID}.rmdup.grp.bai    $PWDS/${subjectID}.rmdup.bai

Stat ${bamtools} stats \ -insert \ -in $PWDS/${subjectID}.rmdup.bam \ > $PWDS/${subjectID}.rmdup.stats

Remove the temp directory rm -rf ${tmp_folder}_rmdup

< Back to Whole Exome Sequencing Analysis Pipeline