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.
Why does GATK 4 MarkDuplicatesSpark process entire bam file even when -intervals option is given?
I am trying to understand a use case with GATK 188.8.131.52 MarkDuplicatesSpark when the -intervals option is given .
I am attempting to process a small interval of a larger bam file, 1:1-1000000, for example, with the command line below. Even though I am specifying a small interval, on some level the entire bam file seems to be processed. I cannot find an option that limits the processing to the interval in question.
gatk --java-options '-Xmx32G' MarkDuplicatesSpark \
--spark-master local \
--tmp-dir "/scratch/local/user123/tmp" \
--output-shard-tmp-dir "/scratch/local/user123/tmp/bam" \
--intervals "1:1-1000000" \
-I sample.cram \
-O 12000.bam \
-M 12000_20k.txt \
-R GATKBundle/human_g1k_v37_decoy_phiXAdaptr.fasta \
--optical-duplicate-pixel-distance 12000 \
MarkDuplicatesSpark completes within a couple of minutes when given a bam subset that includes only reads from the interval 1:1-1000000 but takes many times longer when given the entire bam file. It would be great to
1. understand why this is occurring
2. read any suggestions to change my command and reduce my processing time