Package org.snpeff.binseq

# Class GenomicSequences

java.lang.Object
org.snpeff.binseq.GenomicSequences

All Implemented Interfaces:
  `Serializable`, `Iterable<MarkerSeq>`

public class GenomicSequences extends Object implements Iterable<MarkerSeq>, Serializable
This class stores all "relevant" sequences in a genome This class is able to: i) Add all regions of interest ii) Store genomic sequences for those regions of interest iii) Retrieve genomic sequences by interval

Author:
  pcingola
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CHR_LEN_SEPARATE_FILE`
`static final int`
`MAX_ITERATIONS`

## Constructor Summary

Constructors
Constructor
Description
`GenomicSequences(Genome genome)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addChromosomeSequence(String chr, String chrSeq)`
Create a sequence for the whole chromsome (mostly used in test cases)
`int`
`addGeneSequences(String chr, String chrSeq)`
Add sequences for each gene in the genome
`void`
`build()`
Build interval forest
`void`
`clear()`
`boolean`
`hasChromosome(String chr)`
Do we have sequence information for this chromosome?
`boolean`
`isEmpty()`
`Iterator<MarkerSeq>`
`iterator()`
`boolean`
`load()`
Load sequences for all 'small chromosomes" (from "sequence.bin" file)
`boolean`
`load(String chr)`
Load sequences for a single chromosome (from "sequence.chr.bin" file)
`boolean`
`loadOrCreateFromGenome(String chr)`
Load sequences from genomic sequence file or (if not file is available) generate some sequences from exons.
`MarkerSeq`
`queryMarkerSequence(Marker marker)`
Find a marker (with sequence) containing query 'marker' Could trigger loading sequences form database
`String`
`querySequence(Marker marker)`
Get sequence for a marker
`void`
`reset()`
`void`
`save(Config config)`
Save genomic sequence into separate files (per chromosome)
`void`
`setDisableLoad(boolean disableLoad)`
`void`
`setVerbose(boolean verbose)`
`String`
`toString()`

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

### MAX_ITERATIONS

public static final int MAX_ITERATIONS

See Also:
  - Constant Field Values

### CHR_LEN_SEPARATE_FILE

public static final int CHR_LEN_SEPARATE_FILE

See Also:
  - Constant Field Values

## Constructor Details

### GenomicSequences

public GenomicSequences(Genome genome)

## Method Details

### addChromosomeSequence

public void addChromosomeSequence(String chr, String chrSeq)
Create a sequence for the whole chromsome (mostly used in test cases)

### addGeneSequences

public int addGeneSequences(String chr, String chrSeq)
Add sequences for each gene in the genome

### build

public void build()
Build interval forest

### clear

public void clear()

### hasChromosome

public boolean hasChromosome(String chr)
Do we have sequence information for this chromosome?

### isEmpty

public boolean isEmpty()

### iterator

public Iterator<MarkerSeq> iterator()

Specified by:
  `iterator` in interface `Iterable<MarkerSeq>`

### load

public boolean load()
Load sequences for all 'small chromosomes" (from "sequence.bin" file)

### load

public boolean load(String chr)
Load sequences for a single chromosome (from "sequence.chr.bin" file)

### loadOrCreateFromGenome

public boolean loadOrCreateFromGenome(String chr)
Load sequences from genomic sequence file or (if not file is available) generate some sequences from exons.

### queryMarkerSequence

public MarkerSeq queryMarkerSequence(Marker marker)
Find a marker (with sequence) containing query 'marker' Could trigger loading sequences form database

Returns:
  A markerSeq containing 'marker' or null if nothing is found

### querySequence

public String querySequence(Marker marker)
Get sequence for a marker

### reset

public void reset()

### save

public void save(Config config)
Save genomic sequence into separate files (per chromosome)

### setDisableLoad

public void setDisableLoad(boolean disableLoad)

### setVerbose

public void setVerbose(boolean verbose)

### toString

public String toString()

Overrides:
  `toString` in class `Object`