public abstract class AbstractTagsOnPhysicalMap extends AbstractTags implements TOPMInterface
TagsOnPhysicalMap
and TagsOnPhysMapHDF5
. TagsOnPhysicalMap is fully loaded into memory when
read, and it can only support one mapping position (the files are either binary or text). TagsOnPhysMapHDF5
can support a large number of mapping position, and only a portion of the data is loaded into memory.
In most cases, TagsOnPhysMapHDF5 should be preferred going forward.BYTE_MISSING, INT_MISSING
Constructor and Description |
---|
AbstractTagsOnPhysicalMap() |
Modifier and Type | Method and Description |
---|---|
int |
getChromosome(int index)
Returns chromosome at give tag index.
|
int |
getChromosomeIndex(int intChrName)
Finds the index in the myChromosomes[] (length = # of chromosomes) corresponding
to the provided int version of the chromosome name
|
int[] |
getChromosomes()
Returns an array whose values are the distinct chromosomes in this
file, as stored in the chromosome[] array.
|
Chromosome[] |
getLoci()
Returns Loci created from getChromosomes().
|
Chromosome |
getLocus(int tagIndex)
Get Chromosome representing chromosome for given tag.
|
int |
getMaxNumVariants()
Returns maximum number of variants stored per tag.
|
byte |
getMultiMaps(int index) |
int |
getSize()
Returns number of tags.
|
int |
getStartPosition(int index)
Returns start position of given tag.
|
byte |
getStrand(int tagIndex)
Returns Strand for given tag.
|
int[] |
getUniquePositions(int chromosome)
Returns the set of unique positions for the given chromosome
|
byte[][] |
getVariantDef()
Returns variant definitions for all tags.
|
byte |
getVariantDef(int tagIndex,
int variantIndex)
Returns variant definition at given tag and variant index.
|
byte[] |
getVariantDefArray(int tagIndex)
Returns an array containing all variant definitions for the tag at the
supplied index.
|
byte[][] |
getVariantOff()
Returns variant position offsets for all tags.
|
byte |
getVariantPosOff(int tagIndex,
int variantIndex)
Returns variant position offset from start position at given tag and
variant index.
|
byte[] |
getVariantPosOffArray(int tagIndex)
Returns an array containing all variant position offsets for the tag at
the supplied index.
|
int[] |
mappedTags() |
String |
printRow(int row) |
String |
printRow(int row,
boolean byPosition) |
void |
printRows(int numRows) |
void |
printRows(int numRows,
boolean requirePhysPosition,
boolean byPosition) |
void |
printRows(int numRows,
boolean requirePhysPosition,
int printChr) |
static String |
printWithMissing(byte b) |
static String |
printWithMissing(int i) |
void |
writeBinaryFile(File outFile) |
void |
writeBinaryFile(File outFile,
int minResolution,
boolean requirePhysPosition,
boolean requireDCOMap,
float minDCOP,
boolean binary)
TODO need to add LocusList to test, whether to include in output, move this to abstract
|
void |
writeBinaryFileForChromosomalRegion(File outFile,
int targetChr,
int minPos,
int maxPos)
Outputs a new binary topm containing only tags with start positions that lie within
the specified chromosomal region (inclusive).
|
void |
writeTextFile(File outfile) |
areTagsEqual, areTagsUnique, compare, compareTags, compareTags, compareTags, getNullTag, getTag, getTagCount, getTagIndex, getTagIndexFirst, getTagIndexSet, getTagLength, getTagLength, getTagSizeInLong, sort, swap
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addVariant, clearVariants, compare, getDcoP, getDivergence, getEndPosition, getMapP, getPositionArray, getReadIndexForPositionIndex, setChromoPosition, setDivergence, setMapP, setMapP, setVariantDef, setVariantPosOff
areTagsUnique, getNullTag, getTag, getTagCount, getTagIndex, getTagIndexSet, getTagLength, getTagSizeInLong
public int getMaxNumVariants()
TOPMInterface
getMaxNumVariants
in interface TOPMInterface
public byte getMultiMaps(int index)
getMultiMaps
in interface TOPMInterface
public int getChromosome(int index)
TOPMInterface
getChromosome
in interface TOPMInterface
index
- tag indexpublic int getSize()
TOPMInterface
getSize
in interface TOPMInterface
public int getStartPosition(int index)
TOPMInterface
getStartPosition
in interface TOPMInterface
index
- tag indexpublic byte getStrand(int tagIndex)
TOPMInterface
getStrand
in interface TOPMInterface
tagIndex
- tag indexpublic byte[][] getVariantDef()
TOPMInterface
getVariantDef
in interface TOPMInterface
public byte getVariantDef(int tagIndex, int variantIndex)
TOPMInterface
getVariantDef
in interface TOPMInterface
tagIndex
- tag indexvariantIndex
- variant indexpublic byte[] getVariantDefArray(int tagIndex)
getVariantDefArray
in interface TOPMInterface
tagIndex
- tag indexpublic byte[][] getVariantOff()
TOPMInterface
getVariantOff
in interface TOPMInterface
public byte getVariantPosOff(int tagIndex, int variantIndex)
TOPMInterface
getVariantPosOff
in interface TOPMInterface
tagIndex
- tag indexvariantIndex
- variant indexpublic byte[] getVariantPosOffArray(int tagIndex)
getVariantPosOffArray
in interface TOPMInterface
tagIndex
- tag indexpublic String printRow(int row)
public static String printWithMissing(byte b)
public static String printWithMissing(int i)
public void writeTextFile(File outfile)
writeTextFile
in interface TOPMInterface
public int[] getChromosomes()
TOPMInterface
getChromosomes
in interface TOPMInterface
public int getChromosomeIndex(int intChrName)
TOPMInterface
getChromosomeIndex
in interface TOPMInterface
public int[] getUniquePositions(int chromosome)
TOPMInterface
getUniquePositions
in interface TOPMInterface
public Chromosome[] getLoci()
TOPMInterface
getLoci
in interface TOPMInterface
public Chromosome getLocus(int tagIndex)
TOPMInterface
getLocus
in interface TOPMInterface
tagIndex
- tag indexpublic void writeBinaryFile(File outFile)
public void writeBinaryFile(File outFile, int minResolution, boolean requirePhysPosition, boolean requireDCOMap, float minDCOP, boolean binary)
outFile
- minResolution
- requirePhysPosition
- requireDCOMap
- minDCOP
- binary
- public void writeBinaryFileForChromosomalRegion(File outFile, int targetChr, int minPos, int maxPos)
outFile
- : use the suffix .topmtargetChr
- minPos
- : set to Integer.MIN_VALUE for no cutoffmaxPos
- : set to Integer.MAX_VALUE for no cutoffpublic int[] mappedTags()
public void printRows(int numRows)
public String printRow(int row, boolean byPosition)
public void printRows(int numRows, boolean requirePhysPosition, boolean byPosition)
public void printRows(int numRows, boolean requirePhysPosition, int printChr)
Copyright © 2018. All rights reserved.