public class SortedAnnotations extends Object
| Modifier and Type | Field and Description |
|---|---|
static Comparator<? super Annotation> |
COMPARE_ANNOTATION_START |
| Constructor and Description |
|---|
SortedAnnotations() |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceToChromosome(int refIndex)
This method sets the annotationIndex to the index of the first occurrence
of annotations on this chromosome
|
void |
advanceToNextAnnotation() |
void |
advanceToPosition(int refIndex,
int pos)
* Method that populates the validAnnotationIndices
with annotations that overlap a given position
|
it.unimi.dsi.fastutil.objects.ObjectArrayList<Annotation> |
currentAnnotations()
Return the set of annotations that overlap with the current position.
|
Annotation |
getAnnotation(int annoIndex) |
int |
getAnnotationIndex() |
String |
getAnnotationsLastChromosome() |
it.unimi.dsi.fastutil.ints.IntAVLTreeSet |
getValidAnnotationIndices() |
boolean |
hasMoreAnnotations()
Determine if there are any more annotations to consider.
|
boolean |
hasOverlappingAnnotations(int refIndex,
int pos)
Returns whether or not the given chromosome and position has overlapping annotations
|
void |
loadAnnotations(Reader annotReader)
Load and sort annotations by their start position.
|
void |
loadAnnotations(String filename)
Load and sort annotations by their end position.
|
Annotation |
nextAnnotation() |
boolean |
pastChosenAnnotation(int annoIndex,
String currentChromosome,
int pos)
Determine if (currentChromosome,pos) is a position past the end of the given annotation
|
boolean |
pastCurrentAnnotation(String currentChromosome,
int pos)
Determine if (currentChromosome,pos) is a position past the end of the current annotation.
|
void |
setAnnotations(Annotation[] annotations) |
void |
setGenome(RandomAccessSequenceInterface genome) |
public static final Comparator<? super Annotation> COMPARE_ANNOTATION_START
public it.unimi.dsi.fastutil.ints.IntAVLTreeSet getValidAnnotationIndices()
public void setAnnotations(Annotation[] annotations)
public void setGenome(RandomAccessSequenceInterface genome)
public int getAnnotationIndex()
public void loadAnnotations(String filename) throws IOException
filename - IOExceptionpublic void loadAnnotations(Reader annotReader) throws IOException
annotReader - IOExceptionpublic boolean hasMoreAnnotations()
public Annotation nextAnnotation()
public void advanceToPosition(int refIndex,
int pos)
refIndex - pos - public void advanceToChromosome(int refIndex)
refIndex - public boolean hasOverlappingAnnotations(int refIndex,
int pos)
refIndex - pos - public it.unimi.dsi.fastutil.objects.ObjectArrayList<Annotation> currentAnnotations()
public Annotation getAnnotation(int annoIndex)
public boolean pastChosenAnnotation(int annoIndex,
String currentChromosome,
int pos)
public boolean pastCurrentAnnotation(String currentChromosome, int pos)
currentChromosome - chromosome of VCF.pos - position of VCF.public void advanceToNextAnnotation()
public String getAnnotationsLastChromosome()
Copyright © 2018 Campagne Laboratory. All rights reserved.