GATK4 best practices error

dhwanidhwani indiaMember

with respect to the gatk best practice [manual]: https://software.broadinstitute.org/gatk/best-practices/workflow?id=11165. Mark Duplicates section:-
which reads MarkDuplicates to perform the duplicate marking followed by SortSam to sort the reads, but when i try to do mark duplicates before SortSam it throws the error Exception in thread "main" picard.PicardException: Input file /scratch/dhwani.dholakia/yeast_data_20190419/S288C/S288C_filtered/sortsam/27_S256_rg.bam is not coordinate sorted

So should SortSam be done before MarkDuplicates or am i doing something wrong?

Following are my exact commands:-

*########### BWA MEM
/opt/apps/bwa-0.7.12/bwa mem /home/dhwani.dholakia/scratch/yeast_sequences/dna_seq/yeast_R64-1-1.fa /home/dhwani.dholakia/scratch/yeast_data_20190419/S288C/S288C_filtered/27_S256_R1_filtered.fastq /home/dhwani.dholakia/scratch/yeast_data_20190419/S288C/S288C_filtered/27_S256_R2_filtered.fastq | samtools view -Sb > bwa/27_S256_bwa_sampe.bam 2> log/bwa_sampe/27_S256.log

*########## Add read groups
java -jar /opt/apps/picard/1.119/AddOrReplaceReadGroups.jar I=bwa/27_S256_bwa_sampe.bam O=sortsam/27_S256_rg.bam RGID=27_S256 RGLB=lib1 RGPL=illumina RGPU=unit1 RGSM=27_S256

*########## Mark duplicates
java -jar /opt/apps/picard/1.119/MarkDuplicates.jar INPUT=sortsam/27_S256_rg.bam OUTPUT= dupmarked/27_S256_aligned_sorted_dupmarked.bam VALIDATION_STRINGENCY="LENIENT" CREATE_INDEX="true" METRICS_FILE= dupmarked/27_S256_Output_Duplicate_metrics 2> log/picard_markduplicates/27_S256.log

Answers

Sign In or Register to comment.