public class AbstractTagsOnPhysicalMap extends AbstractTags implements TOPMInterface
Abstract TagsOnPhysicalMap object. Abstract alignment is implemented by two types of TOPM classes and class TagsOnPhysicalMap. 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.class TagsOnPhysMapHDF5
class TagsOnPhysicalMap,
class TagsOnPhysMapHDF5protected kotlin.Array[] bestChr
protected kotlin.Array[] indicesOfSortByPosition
protected int myMaxVariants
protected kotlin.Array[] multimaps
protected kotlin.Array[] bestStartPos
protected kotlin.Array[] bestStrand
protected int myNumTags
protected kotlin.Array[] variantDefs
protected kotlin.Array[] variantOffsets
protected kotlin.Array[] myChromosomes
protected kotlin.Array[] myUniquePositions
public int getMaxNumVariants()
public byte getMultiMaps(int index)
public int getChromosome(int index)
public int getSize()
public int getStartPosition(int index)
public byte getStrand(int tagIndex)
public kotlin.Array[] getVariantDef()
protected kotlin.Array[] getVariantDefByReference()
Provides the reference
protected kotlin.Array[] getVariantOffByReference()
public byte getVariantDef(int tagIndex,
int variantIndex)
public kotlin.Array[] getVariantDefArray(int tagIndex)
Returns an array containing all variant definitions for the tag at the supplied index.
tagIndex - tag indexpublic kotlin.Array[] getVariantOff()
public byte getVariantPosOff(int tagIndex,
int variantIndex)
public kotlin.Array[] getVariantPosOffArray(int tagIndex)
Returns an array containing all variant position offsets for the tag at the supplied index.
tagIndex - tag indexpublic java.lang.String printRow(int row)
public static java.lang.String printWithMissing(byte b)
public static java.lang.String printWithMissing(int i)
public void writeTextFile(java.io.File outfile)
public kotlin.Array[] getChromosomes()
public int getChromosomeIndex(int intChrName)
public kotlin.Array[] getUniquePositions(int chromosome)
protected void populateChrAndVarPositions()
Creates the arrays for the all the positions for each chromosome as defined by the variants. Call this method after remapping or after loading the file, and it will be used for SNP calling.
public Chromosome[] getLoci()
public Chromosome getLocus(int tagIndex)
public void writeBinaryFile(java.io.File outFile)
protected void writeBinaryFile(java.io.File outFile,
boolean binary)
public void writeBinaryFile(java.io.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
outFile - minResolution - requirePhysPosition - requireDCOMap - minDCOP - binary - public void writeBinaryFileForChromosomalRegion(java.io.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). To obtain the whole chromosome, set minPos to Integer.MIN_VALUE and maxPos to Integer.MAX_VALUE TODO : generalize to other types of topm (HDF5, text)?
outFile - : use the suffix .topmtargetChr - minPos - : set to Integer.MIN_VALUE for no cutoffmaxPos - : set to Integer.MAX_VALUE for no cutoffpublic kotlin.Array[] mappedTags()
public void printRows(int numRows)
public java.lang.String printRow(int row,
boolean byPosition)
public void printRows(int numRows,
boolean requirePhysPosition,
boolean byPosition)
public void printRows(int numRows,
boolean requirePhysPosition,
int printChr)
protected kotlin.Array[] getTagsArray()
protected kotlin.Array[] getTagLengthArray()