Define intervals to target for local realignment
The local realignment process is designed to consume one or more BAM files and to locally realign reads such that the number of mismatching bases is minimized across all the reads. In general, a large percent of regions requiring local realignment are due to the presence of an insertion or deletion (indels) in the individual's genome with respect to the reference genome. Such alignment artifacts result in many bases mismatching the reference near the misalignment, which are easily mistaken as SNPs. Moreover, since read mapping algorithms operate on each read independently, it is impossible to place reads on the reference genome such that mismatches are minimized across all reads. Consequently, even when some reads are correctly mapped with indels, reads covering the indel near just the start or end of the read are often incorrectly mapped with respect the true indel, also requiring realignment. Local realignment serves to transform regions with misalignments due to indels into clean reads containing a consensus indel suitable for standard variant discovery approaches.
Note that indel realignment is no longer necessary for variant discovery if you plan to use a variant caller that performs a haplotype assembly step, such as HaplotypeCaller or MuTect2. However it is still required when using legacy callers such as UnifiedGenotyper or the original MuTect.
There are 2 steps to the realignment process:
For more details, see the indel realignment method documentation.
One or more aligned BAM files and optionally, one or more lists of known indels.
A list of target intervals to pass to the IndelRealigner.
java -jar GenomeAnalysisTK.jar \ -T RealignerTargetCreator \ -R reference.fasta \ -I input.bam \ --known indels.vcf \ -o forIndelRealigner.intervals
These Read Filters are automatically applied to the data by the Engine before processing by RealignerTargetCreator.
This tool can be run in multi-threaded mode using this option.
This tool uses a sliding window on the reference.
All tools inherit arguments from the GATK Engine' "CommandLineGATK" argument collection, which can be used to modify various aspects of the tool's function. For example, the -L argument directs the GATK engine to restrict processing to specific genomic intervals; or the -rf argument allows you to apply certain read filters to exclude some of the data from the analysis.
This table summarizes the command-line arguments that are specific to this tool. For more details on each argument, see the list further down below the table or click on an argument name to jump directly to that entry in the list.
Argument name(s) | Default value | Summary | |
---|---|---|---|
Optional Inputs | |||
--known |
[] | Input VCF file with known indels | |
Optional Outputs | |||
--out -o |
NA | An output file created by the walker. Will overwrite contents if file exists | |
Optional Parameters | |||
--maxIntervalSize -maxInterval |
500 | maximum interval size; any intervals larger than this value will be dropped | |
--minReadsAtLocus -minReads |
4 | minimum reads at a locus to enable using the entropy calculation | |
--mismatchFraction -mismatch |
0.0 | fraction of base qualities needing to mismatch for a position to have high entropy | |
--windowSize -window |
10 | window size for calculating entropy or SNP clusters |
Arguments in this list are specific to this tool. Keep in mind that other arguments are available that are shared with other tools (e.g. command-line GATK arguments); see Inherited arguments above.
Input VCF file with known indels
Any number of VCF files representing known SNPs and/or indels. Could be e.g. dbSNP and/or official 1000 Genomes indel calls.
SNPs in these files will be ignored unless the --mismatchFraction argument is used.
This argument supports reference-ordered data (ROD) files in the following formats: BCF2, VCF, VCF3
List[RodBinding[VariantContext]] []
maximum interval size; any intervals larger than this value will be dropped
Because the realignment algorithm is N^2, allowing too large an interval might take too long to completely realign.
int 500 [ [ -∞ ∞ ] ]
minimum reads at a locus to enable using the entropy calculation
int 4 [ [ -∞ ∞ ] ]
fraction of base qualities needing to mismatch for a position to have high entropy
To disable this behavior, set this value to <= 0 or > 1. This feature is really only necessary when using an ungapped aligner
(e.g. MAQ in the case of single-end read data) and should be used in conjunction with '--model USE_SW' in the IndelRealigner.
double 0.0 [ [ -∞ ∞ ] ]
An output file created by the walker. Will overwrite contents if file exists
The target intervals for realignment.
File NA
window size for calculating entropy or SNP clusters
Any two SNP calls and/or high entropy positions are considered clustered when they occur no more than this many basepairs apart. Must be > 1.
int 10 [ [ -∞ ∞ ] ]