|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttrans.anno.Region
Represents a genomic region. See Coordinates for a more simple class.
Constructor Summary | |
Region(java.lang.String chromosome,
int start,
int end,
java.lang.String notes)
|
Method Summary | |
int |
bpIntersectionSameChromosome(Region other)
Assumes regions are on the same chromosome, and the end base is included, not interbase numbering. |
double |
calculateGCContent()
Returns the fraction of GC provided the Region.gcContent[] is loaded. |
java.lang.String |
getChromosome()
|
int |
getEnd()
|
boolean[] |
getGcContent()
|
java.util.HashSet |
getHits()
|
int |
getLength()
Returns end - start +1, thus last base is included, not interbase numbering! |
java.lang.String |
getNotes()
|
int |
getStart()
|
boolean |
intersect(Interval interval)
|
boolean |
intersect(TPMapLine line)
|
boolean |
intersect(Window window,
int sizeOligo,
double fractionAcceptibleCoverage)
Returns true only if region contains or is contained or is covered by >= fractionAcceptibleCoverage by a window. |
static Region[] |
loadBinaryCoordinates(java.io.File file)
Reads binary chrom start stop file into Region[] |
static Region[] |
loadWriteBinaryRegions(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. |
int |
overlap(Interval interval)
Returns -1 for no overlap, or a positive int for the # bases of overlap. |
static Region[] |
parseRegions(java.io.File file)
Parses a file for a tab delimited list of at minimum, chrom, start, stop, (optional) notes into a GenomicRegion[]. |
void |
setChromosome(java.lang.String chromosome)
|
void |
setEnd(int end)
|
void |
setGcContent(boolean[] gcContent)
|
void |
setHits(java.util.HashSet hits)
|
void |
setNotes(java.lang.String notes)
|
void |
setStart(int start)
|
static java.util.HashMap |
splitByChromosome(Region[] sorted)
Given a chromosome SORTED array of Regions returns a HashMap containing chromosome: sorted chromo specific Region[] |
java.lang.String |
toString()
|
static void |
writeBinaryCoordinates(java.io.File file,
Region[] r)
Writes the chrom start stop of a Region[] as a binary file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Region(java.lang.String chromosome, int start, int end, java.lang.String notes)
Method Detail |
public int getLength()
public static Region[] loadWriteBinaryRegions(java.io.File regionsFile)
public static Region[] loadBinaryCoordinates(java.io.File file)
public static void writeBinaryCoordinates(java.io.File file, Region[] r)
public static java.util.HashMap splitByChromosome(Region[] sorted)
public java.lang.String toString()
public double calculateGCContent()
public boolean intersect(Interval interval)
public boolean intersect(TPMapLine line)
public boolean intersect(Window window, int sizeOligo, double fractionAcceptibleCoverage)
public int bpIntersectionSameChromosome(Region other)
public int overlap(Interval interval)
public static Region[] parseRegions(java.io.File file)
public java.lang.String getChromosome()
public void setChromosome(java.lang.String chromosome)
public int getEnd()
public void setEnd(int end)
public java.util.HashSet getHits()
public void setHits(java.util.HashSet hits)
public java.lang.String getNotes()
public void setNotes(java.lang.String notes)
public int getStart()
public void setStart(int start)
public boolean[] getGcContent()
public void setGcContent(boolean[] gcContent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |