|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttrans.anno.RandomRegions
Use to generate random regions of a defined length from a file of regions (chrom, start, stop). No attention is paid to the chromosome so if you want chromosome matching then split the regions file by chromosome and make a seperate RandomRegions object.
Constructor Summary | |
RandomRegions(java.io.File regionsFile)
|
|
RandomRegions(java.io.File regionsFile,
java.io.File genomicSequenceDirectory)
|
Method Summary | |
int |
countLengths(Region[] rs)
|
boolean[][] |
fetchGCContent(Region[] r)
Converts the Region[] sequences into boolean[]s, everything not g or c are recorded as false. |
int[][] |
fetchRandomCoordinates(int length,
int number)
Given a desired length of sequence, returns multiple random region start stop coordinates. |
int[][] |
fetchRandomCoordinates(int length,
int number,
double fractionGCContent)
Given a desired length of sequence, returns multiple random region start stop coordinates. |
Region |
findRandomRegion(int minimumLength)
Attempt to find a random Region of the appropriate minimum length. |
int[] |
findRandomSegment(Region region,
int length)
Returns a random segment of the appropriate length within the region. |
static Region[] |
loadBinaryCoordinatesAsRegionArray(java.io.File file)
Reads binary chrom start stop file into Region[] |
static Region[] |
loadWriteBinaryCoordinates(java.io.File regionsFile)
Looks for a binary version of the file xxx.corr, if found loads binary, otherwise it parses the txt file and then writes the binary for future use. |
static void |
main(java.lang.String[] args)
|
void |
makeRegions(java.io.File regionsFile)
Parses the regions file but then adds a pointer per base pair length/ divider to the Region[] for every region. |
static void |
saveRegionsAsCoordinatesArray(java.io.File file,
Region[] r)
Writes the chrom start stop of a Region[] as a binary file. |
void |
setGenomicSequenceDirectory(java.io.File genomicSequenceDirectory)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomRegions(java.io.File regionsFile)
public RandomRegions(java.io.File regionsFile, java.io.File genomicSequenceDirectory)
Method Detail |
public static void main(java.lang.String[] args)
public static Region[] loadWriteBinaryCoordinates(java.io.File regionsFile)
public static Region[] loadBinaryCoordinatesAsRegionArray(java.io.File file)
public static void saveRegionsAsCoordinatesArray(java.io.File file, Region[] r)
public int[][] fetchRandomCoordinates(int length, int number)
public int[][] fetchRandomCoordinates(int length, int number, double fractionGCContent)
public int[] findRandomSegment(Region region, int length)
public Region findRandomRegion(int minimumLength)
public boolean[][] fetchGCContent(Region[] r)
public void makeRegions(java.io.File regionsFile)
public int countLengths(Region[] rs)
public void setGenomicSequenceDirectory(java.io.File genomicSequenceDirectory)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |