public class Annotation extends Object implements Comparable<Annotation>
| Modifier and Type | Field and Description |
|---|---|
protected String |
chromosome |
int |
chromosomeIndex
A field to store the index of the chromosome in some genome.
|
protected String |
id |
protected it.unimi.dsi.fastutil.objects.ObjectList<Segment> |
segments |
protected String |
strand |
| Constructor and Description |
|---|
Annotation(String id,
String chromosome) |
Annotation(String id,
String chromosome,
String strand) |
Annotation(String id,
String chromosome,
String strand,
int chromosomeIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSegment(Segment segment) |
int |
compareTo(Annotation annot) |
boolean |
equals(Object obj) |
String |
getChromosome() |
int |
getEnd() |
String |
getId() |
int |
getLength() |
it.unimi.dsi.fastutil.objects.ObjectList<Segment> |
getSegments() |
int |
getStart() |
String |
getStrand() |
boolean |
overlap(Annotation annotation2) |
boolean |
overlap(String chromosome,
int position)
Determine if any segment overlaps with the specified position.
|
void |
remove(Segment element) |
void |
sortSegments() |
String |
toString() |
boolean |
withinRange(String chromosome,
int position)
Determines if the specified position overlaps within the interval of this annotation
Does not necessarily imply segment overlap
|
void |
write(PrintWriter annotationWriter) |
void |
write(PrintWriter annotationWriter,
char delimiter) |
protected final String id
protected final String chromosome
protected final it.unimi.dsi.fastutil.objects.ObjectList<Segment> segments
protected final String strand
public int chromosomeIndex
public void sortSegments()
public void addSegment(Segment segment)
public int compareTo(Annotation annot)
compareTo in interface Comparable<Annotation>public int getStart()
public int getEnd()
public int getLength()
public String getId()
public String getChromosome()
public it.unimi.dsi.fastutil.objects.ObjectList<Segment> getSegments()
public String getStrand()
public boolean overlap(String chromosome, int position)
chromosome - position - public boolean withinRange(String chromosome, int position)
chromosome - position - public boolean overlap(Annotation annotation2)
public void write(PrintWriter annotationWriter)
public void write(PrintWriter annotationWriter, char delimiter)
public void remove(Segment element)
Copyright © 2018 Campagne Laboratory. All rights reserved.