Package org.snpsift.annotate

# Class VcfIndexTree

java.lang.Object
org.snpsift.annotate.VcfIndexTree

All Implemented Interfaces:
  `Iterable<org.snpeff.interval.Marker>`, `org.snpeff.interval.tree.Itree`

public class VcfIndexTree extends Object implements org.snpeff.interval.tree.Itree
Interval tree structure for an 'VcfIndexChromo' The whole tree is stored in a single class as a set of arrays. Nodes are referenced by index in the array

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`COLLAPSE_MAX_NUM_ENTRIES`
`static final int`
`DEFAULT_MAX_BLOCK_SIZE`
`static final int`
`INITIAL_CAPACITY`
`static final int`
`MAX_DIFF_COLLAPSE`

## Constructor Summary

Constructors
Constructor
Description
`VcfIndexTree()`
`VcfIndexTree(org.snpeff.fileIterator.VcfFileIterator vcf, VcfIndexDataChromo vcfIndexChromo)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(org.snpeff.interval.Marker interval)`
`void`
`add(org.snpeff.interval.Markers markers)`
`void`
`build()`
`String`
`getChromosome()`
`org.snpeff.interval.Markers`
`getIntervals()`
`boolean`
`isEmpty()`
`boolean`
`isInSync()`
`Iterator<org.snpeff.interval.Marker>`
`iterator()`
`boolean`
`load(DataInputStream in)`
Read data from input stream
`void`
`load(String fileName, org.snpeff.interval.Genome genome)`
`org.snpeff.interval.Markers`
`query(org.snpeff.interval.Interval queryMarker)`
Query index to find all VCF entries intersecting 'marker' Store VCF entries in 'results'
`protected void`
`query(org.snpeff.interval.Interval queryMarker, int idx, org.snpeff.interval.Markers results)`
Query index to find all VCF entries intersecting 'marker', starting from node 'idx' Store VCF entries in 'results'
`protected void`
`queryIntersects(org.snpeff.interval.Interval queryMarker, int idx, org.snpeff.interval.Markers results)`
Query VCF entries intersecting 'marker' at node 'idx'
`void`
`save(DataOutputStream out)`
Save to output stream
`void`
`setDebug(boolean debug)`
`void`
`setMaxBlockSize(int maxBlockSize)`
`void`
`setVcf(org.snpeff.fileIterator.VcfFileIterator vcf)`
`void`
`setVerbose(boolean verbose)`
`int`
`size()`
`org.snpeff.interval.Markers`
`stab(int point)`
`String`
`toString()`
`String`
`toString(int idx)`
`String`
`toStringAll()`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### COLLAPSE_MAX_NUM_ENTRIES

public static final int COLLAPSE_MAX_NUM_ENTRIES

See Also:
  - Constant Field Values

### DEFAULT_MAX_BLOCK_SIZE

public static final int DEFAULT_MAX_BLOCK_SIZE

See Also:
  - Constant Field Values

### INITIAL_CAPACITY

public static final int INITIAL_CAPACITY

See Also:
  - Constant Field Values

### MAX_DIFF_COLLAPSE

public static final int MAX_DIFF_COLLAPSE

See Also:
  - Constant Field Values

## Constructor Details

### VcfIndexTree

public VcfIndexTree()

### VcfIndexTree

public VcfIndexTree(org.snpeff.fileIterator.VcfFileIterator vcf, VcfIndexDataChromo vcfIndexChromo)

## Method Details

### add

public void add(org.snpeff.interval.Marker interval)

Specified by:
  `add` in interface `org.snpeff.interval.tree.Itree`

### add

public void add(org.snpeff.interval.Markers markers)

Specified by:
  `add` in interface `org.snpeff.interval.tree.Itree`

### build

public void build()

Specified by:
  `build` in interface `org.snpeff.interval.tree.Itree`

### getChromosome

public String getChromosome()

### getIntervals

public org.snpeff.interval.Markers getIntervals()

Specified by:
  `getIntervals` in interface `org.snpeff.interval.tree.Itree`

### isEmpty

public boolean isEmpty()

Specified by:
  `isEmpty` in interface `org.snpeff.interval.tree.Itree`

### isInSync

public boolean isInSync()

Specified by:
  `isInSync` in interface `org.snpeff.interval.tree.Itree`

### iterator

public Iterator<org.snpeff.interval.Marker> iterator()

Specified by:
  `iterator` in interface `Iterable<org.snpeff.interval.Marker>`

### load

public boolean load(DataInputStream in)
Read data from input stream

Returns:
  true on success

### load

public void load(String fileName, org.snpeff.interval.Genome genome)

Specified by:
  `load` in interface `org.snpeff.interval.tree.Itree`

### query

public org.snpeff.interval.Markers query(org.snpeff.interval.Interval queryMarker)
Query index to find all VCF entries intersecting 'marker' Store VCF entries in 'results'

Specified by:
  `query` in interface `org.snpeff.interval.tree.Itree`

### query

protected void query(org.snpeff.interval.Interval queryMarker, int idx, org.snpeff.interval.Markers results)
Query index to find all VCF entries intersecting 'marker', starting from node 'idx' Store VCF entries in 'results'

### queryIntersects

protected void queryIntersects(org.snpeff.interval.Interval queryMarker, int idx, org.snpeff.interval.Markers results)
Query VCF entries intersecting 'marker' at node 'idx'

### save

public void save(DataOutputStream out)
Save to output stream

### setDebug

public void setDebug(boolean debug)

### setMaxBlockSize

public void setMaxBlockSize(int maxBlockSize)

### setVcf

public void setVcf(org.snpeff.fileIterator.VcfFileIterator vcf)

### setVerbose

public void setVerbose(boolean verbose)

### size

public int size()

Specified by:
  `size` in interface `org.snpeff.interval.tree.Itree`

### stab

public org.snpeff.interval.Markers stab(int point)

Specified by:
  `stab` in interface `org.snpeff.interval.tree.Itree`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### toString

public String toString(int idx)

### toStringAll

public String toStringAll()