public TOPMInterface extends Tags
Tags on Physical Map (TOPM) Interface. Define methods for the TOPM classes. The TOPM class holds information relating tags to the physical map, variants (SNPs) called by the tag, and quality of mapping information.
Physical map information is recorded with chromosome, strand, start and end positions. If a tags maps to multiple locations with equal quality it is recorded in multimaps with the count of multi-mapping.
Each SNP call for a tag is record in the variant fields. The position by the variant offset, which is added to the startPosition (negative values indicate before the startPosition). Each variant is also defined by the SNP call implied by the given tag. The called are stored in a byte using the NucleotideAlignmentConstants (A=00, C=01, G=02, T=03).
static byte BYTE_MISSING
static int INT_MISSING
int addVariant(int tagIndex,
byte offset,
byte base)
Adds Variant definition.
tagIndex - tag indexoffset - offsetbase - base value one of: NucleotideAlignmentConstants.A_ALLELE, NucleotideAlignmentConstants.C_ALLELE, NucleotideAlignmentConstants.G_ALLELE, NucleotideAlignmentConstants.T_ALLELE, NucleotideAlignmentConstants.GAP_ALLELE, NucleotideAlignmentConstants.INSERT_ALLELE, Alignment.UNKNOWN_ALLELEint compare(int index1,
int index2)
Compares tags at given indices.
index1 - first indexindex2 - second indexint getChromosome(int index)
Returns chromosome at give tag index.
index - tag indexkotlin.Array[] getChromosomes()
Returns an array whose values are the distinct chromosomes in this file, as stored in the chromosome[] array. The indices are arbitrary.
int getChromosomeIndex(int intChrName)
Finds the index in the myChromosomes[] (length = # of chromosomes) corresponding to the provided int version of the chromosome name
byte getDcoP(int index)
Round(Log2(P))
index - tag indexbyte getDivergence(int index)
Returns Divergence
index - tag indexint getEndPosition(int index)
Returns End Position of Tag
index - tag indexChromosome[] getLoci()
Returns Loci created from getChromosomes().
Chromosome getLocus(int tagIndex)
Get Chromosome representing chromosome for given tag.
tagIndex - tag indexbyte getMapP(int index)
int getMaxNumVariants()
Returns maximum number of variants stored per tag.
byte getMultiMaps(int index)
kotlin.Array[] getPositionArray(int index)
Returns chromosome, strand, and start position for given tag.
index - tag indexint getReadIndexForPositionIndex(int posIndex)
Consider removing this. -Terry
int getSize()
Returns number of tags.
int getStartPosition(int index)
Returns start position of given tag.
index - tag indexbyte getStrand(int tagIndex)
Returns Strand for given tag.
tagIndex - tag indexbyte getVariantDef(int tagIndex,
int variantIndex)
Returns variant definition at given tag and variant index.
tagIndex - tag indexvariantIndex - variant indexkotlin.Array[] getUniquePositions(int chromosome)
Returns the set of unique positions for the given chromosome
chromosome - kotlin.Array[] getVariantDefArray(int tagIndex)
Returns an array containing all variant definitions for given tag.
tagIndex - tag indexbyte getVariantPosOff(int tagIndex,
int variantIndex)
Returns variant position offset from start position at given tag and variant index.
tagIndex - tag indexvariantIndex - variant indexkotlin.Array[] getVariantPosOffArray(int tagIndex)
Returns an array containing all variant position offsets for given tag.
tagIndex - tag indexkotlin.Array[] getVariantOff()
Returns variant position offsets for all tags. First index of result is tag and second is variant.
kotlin.Array[] getVariantDef()
Returns variant definitions for all tags. First index of result is tag and second is variant.
void setChromoPosition(int index,
int chromosome,
byte strand,
int positionMin,
int positionMax)
Sets chromosome, strand, start position, and end position for given tag.
index - tag indexchromosome - chromosomestrand - strandpositionMin - start positionpositionMax - end positionvoid setDivergence(int index,
byte divergence)
Set Divergence for given tag
index - tag indexdivergence - divergencevoid setMapP(int index,
byte mapP)
Set MapP for given tag
index - tag indexmapP - MapPvoid setMapP(int index,
double mapP)
void setVariantDef(int tagIndex,
int variantIndex,
byte def)
Set variant definition at given tag and variant index.
tagIndex - tag indexvariantIndex - variant indexdef - definition (see addVariant())void setVariantPosOff(int tagIndex,
int variantIndex,
byte offset)
Set variant position offset at given tag and variant index.
tagIndex - tag indexvariantIndex - variant indexoffset - position offsetvoid clearVariants()
Clears all variant definitions and position offsets.
void writeTextFile(java.io.File outfile)