Package org.snpeff.interval

# Class Chromosome

java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
org.snpeff.interval.Chromosome

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Comparable<Interval>`, `TxtSerializable`

public class Chromosome extends Marker
Interval for the whole chromosome If a SNP has no 'ChromosomeInterval' => it is outside the chromosome => Invalid

Author:
  pcingola
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.snpeff.interval.Marker

`type`

### Fields inherited from class org.snpeff.interval.Interval

`chromosomeNameOri, end, id, parent, start, strandMinus`

## Constructor Summary

Constructors
Constructor
Description
`Chromosome()`
`Chromosome(Genome parent, int start, int end, String id)`

## Method Summary

Modifier and Type
Method
Description
`Chromosome`
`cloneShallow()`
Perform a shallow clone
`static int`
`compare(String chr1, String chr2)`
Compare chromosome names
`int`
`compareChromoName(Interval interval)`
Compare only chromosome's name
`boolean`
`detectCircular()`
Is this a circular chromosome? See if any exon has evidence of 'circular coordinates'
`CodonTable`
`getCodonTable()`
`DnaSequence`
`getDnaSequence()`
`String`
`getSequence()`
`boolean`
`isCircular()`
Is this interval part of a circular chromosome and it spans the 'chromosome zero / chromosome end' line?
`boolean`
`isMt()`
Is this a mitochondrial chromosome? Note: This is a wild guess just by looking at the name
`protected boolean`
`isShowWarningIfParentDoesNotInclude()`
Show an error if parent does not include child?
`static int`
`number(String chrName)`
Convert to chromosome number (return '0' if it cannot be converted)
`void`
`serializeParse(MarkerSerializer markerSerializer)`
Parse a line from a serialized file
`String`
`serializeSave(MarkerSerializer markerSerializer)`
Create a string to serialize to a file
`void`
`setCircular(boolean circular)`
`void`
`setLength(int len)`
`void`
`setSequence(String sequenceStr)`
Set sequence for this chromosome
`static String`
`simpleName(String chrName)`
Simplify chromosome name
`String`
`toString()`

### Methods inherited from class org.snpeff.interval.Marker

`adjust, apply, applyDel, applyDup, applyIns, applyMixed, clone, codonTable, compareTo, compareToPos, distance, distanceBases, getParent, getType, idChain, idChain, idChain, includes, intersect, isAdjustIfParentDoesNotInclude, isDeferredAnalysis, minus, query, query, readTxt, shouldApply, union, variantEffect, variantEffectNonRef`

### Methods inherited from class org.snpeff.interval.Interval

`equals, findParent, getChromosome, getChromosomeName, getChromosomeNameOri, getChromosomeNum, getEnd, getGenome, getGenomeName, getId, getStart, getStrand, hashCode, intersects, intersects, intersects, intersects, intersectSize, isSameChromo, isStrandMinus, isStrandPlus, isValid, setChromosomeNameOri, setEnd, setId, setParent, setStart, setStrandMinus, shiftCoordinates, size, toStr, toStringAsciiArt, toStrPos`

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

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

## Constructor Details

### Chromosome

public Chromosome()

### Chromosome

public Chromosome(Genome parent, int start, int end, String id)

## Method Details

### compare

public static int compare(String chr1, String chr2)
Compare chromosome names

### number

public static int number(String chrName)
Convert to chromosome number (return '0' if it cannot be converted)

### simpleName

public static String simpleName(String chrName)
Simplify chromosome name

### cloneShallow

public Chromosome cloneShallow()
Description copied from class: `Marker`
Perform a shallow clone

Overrides:
  `cloneShallow` in class `Marker`

### compareChromoName

public int compareChromoName(Interval interval)
Compare only chromosome's name

### detectCircular

public boolean detectCircular()
Is this a circular chromosome? See if any exon has evidence of 'circular coordinates'

Returns:

### getCodonTable

public CodonTable getCodonTable()

### getDnaSequence

public DnaSequence getDnaSequence()

### getSequence

public String getSequence()

### isCircular

public boolean isCircular()
Description copied from class: `Interval`
Is this interval part of a circular chromosome and it spans the 'chromosome zero / chromosome end' line?

Overrides:
  `isCircular` in class `Interval`

### isMt

public boolean isMt()
Is this a mitochondrial chromosome? Note: This is a wild guess just by looking at the name

### isShowWarningIfParentDoesNotInclude

protected boolean isShowWarningIfParentDoesNotInclude()
Description copied from class: `Marker`
Show an error if parent does not include child?

Overrides:
  `isShowWarningIfParentDoesNotInclude` in class `Marker`

### serializeParse

public void serializeParse(MarkerSerializer markerSerializer)
Parse a line from a serialized file

Specified by:
  `serializeParse` in interface `TxtSerializable`
Overrides:
  `serializeParse` in class `Marker`

### serializeSave

public String serializeSave(MarkerSerializer markerSerializer)
Description copied from class: `Marker`
Create a string to serialize to a file

Specified by:
  `serializeSave` in interface `TxtSerializable`
Overrides:
  `serializeSave` in class `Marker`

### setCircular

public void setCircular(boolean circular)

### setLength

public void setLength(int len)

### setSequence

public void setSequence(String sequenceStr)
Set sequence for this chromosome

Parameters:
  `sequenceStr` -

### toString

public String toString()

Overrides:
  `toString` in class `Marker`