# RealignerTargetCreator

Emits intervals for the Local Indel Realigner to target for realignment.

## Overview

The local realignment tool 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. Unlike most mappers, this walker uses the full alignment context to determine whether an appropriate alternate reference (i.e. indel) exists. Following local realignment, the GATK tool Unified Genotyper can be used to sensitively and specifically identify indels.

There are 2 steps to the realignment process:
1. Determining (small) suspicious intervals which are likely in need of realignment (RealignerTargetCreator)
2. Running the realigner over those intervals (see the IndelRealigner tool)

Important note 1: the input BAM(s), reference, and known indel file(s) should be the same ones to be used for the IndelRealigner step.

Important note 2: when multiple potential indels are found by the tool in the same general region, the tool will choose the most likely one for realignment to the exclusion of the others. This is a known limitation of the tool.

Important note 3: because reads produced from the 454 technology inherently contain false indels, the realigner will not currently work with them (or with reads from similar technologies). This tool also ignores MQ0 reads and reads with consecutive indel operators in the CIGAR string.

### Input

One or more aligned BAM files and optionally one or more lists of known indels.

### Output

A list of target intervals to pass to the Indel Realigner.

### Examples

 java -Xmx2g -jar GenomeAnalysisTK.jar \
-T RealignerTargetCreator \
-R ref.fasta \
-I input.bam \
-o forIndelRealigner.intervals \
[--known /path/to/indels.vcf]


These Read Filters are automatically applied to the data by the Engine before processing by RealignerTargetCreator.

### Parallelism options

This tool can be run in multi-threaded mode using this option.

### Downsampling settings

This tool applies the following downsampling settings by default.

• Mode: BY_SAMPLE
• To coverage: 1,000

### Window size

This tool uses a sliding window on the reference.

• Window start: -1 bp before the locus
• Window stop: 50 bp after the locus

## Command-line Arguments

### Inherited arguments

The arguments described in the entries below can be supplied to this tool to modify its behavior. For example, the -L argument directs the GATK engine restricts processing to specific genomic intervals (this is an Engine capability and is therefore available to all GATK walkers).

### RealignerTargetCreator specific arguments

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
stdout 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
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

### Argument details

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.

### --known / -known

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.

--known binds reference ordered data. This argument supports ROD files of the following types: BCF2, VCF, VCF3

List[RodBinding[VariantContext]]  []

### --maxIntervalSize / -maxInterval

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  [ [ -∞  ∞ ] ]

### --mismatchFraction / -mismatch

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  [ [ -∞  ∞ ] ]

### --out / -o

An output file created by the walker. Will overwrite contents if file exists
The target intervals for realignment.

PrintStream  stdout

### --windowSize / -window

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  [ [ -∞  ∞ ] ]

GATK version 3.2-2-gec30cee built at 2014/09/12 22:29:29. GTD: NA