Notice:
If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra


Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.

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.