Package picard.util

# Class ScatterIntervalsByNs

java.lang.Object
picard.cmdline.CommandLineProgram
picard.util.ScatterIntervalsByNs

@DocumentedFeature public class ScatterIntervalsByNs extends CommandLineProgram
A Tool for breaking up a reference into intervals of alternating regions of N and ACGT bases.

### Summary

Used for creating a broken-up interval list that can be used for scattering a variant-calling pipeline in a way that will not cause problems at the edges of the intervals. By using large enough N blocks (so that the tools will not be able to anchor on both sides) we can be assured that the results of scattering and gathering the variants with the resulting interval list will be the same as calling with one large region.

### Input

<il>
- A reference file to use for creating the intervals
- Which type of intervals to emit in the output (Ns only, ACGT only or both).
- An integer indicating the largest number of Ns in a contiguous block that will be "tolerated" and not converted into an N block.
</il>

### Output

An interval list (with a SAM header) where the names of the intervals are labeled (either N-block or ACGT-block) to indicate what type of block they define.

### Usage example

#### Create an interval list of intervals that do not contain any N blocks for use with haplotype caller on short reads

     java -jar picard.jar ScatterIntervalsByNs \
           R=reference_sequence.fasta \
           OT=BOTH \
           O=output.interval_list

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`ScatterIntervalsByNs.ScatterIntervalsByNReferenceArgumentCollection`

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`MAX_TO_MERGE`
`File`
`OUTPUT`
`picard.util.ScatterIntervalsByNs.OutputType`
`OUTPUT_TYPE`

### Fields inherited from class picard.cmdline.CommandLineProgram

`COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY`

## Constructor Summary

Constructors
Constructor
Description
`ScatterIntervalsByNs()`

## Method Summary

Modifier and Type
Method
Description
`protected int`
`doWork()`
Do the work after command line has been parsed.
`protected ReferenceArgumentCollection`
`makeReferenceArgumentCollection()`

### Methods inherited from class picard.cmdline.CommandLineProgram

`checkRInstallation, customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### OUTPUT

@Argument(shortName="O", doc="Output file for interval list.") public File OUTPUT

### OUTPUT_TYPE

@Argument(shortName="OT", doc="Type of intervals to output.", optional=true) public picard.util.ScatterIntervalsByNs.OutputType OUTPUT_TYPE

### MAX_TO_MERGE

@Argument(shortName="N", doc="Maximal number of contiguous N bases to tolerate, thereby continuing the current ACGT interval.", optional=true) public int MAX_TO_MERGE

## Constructor Details

### ScatterIntervalsByNs

public ScatterIntervalsByNs()

## Method Details

### makeReferenceArgumentCollection

protected ReferenceArgumentCollection makeReferenceArgumentCollection()

Overrides:
  `makeReferenceArgumentCollection` in class `CommandLineProgram`

### doWork

protected int doWork()
Description copied from class: `CommandLineProgram`
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.

Specified by:
  `doWork` in class `CommandLineProgram`
Returns:
  program exit status.