public class AnnotationWeightCount extends Object implements AnnotationCountInterface
| Constructor and Description |
|---|
AnnotationWeightCount(WeightsInfo weights)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accumulate() |
float |
averageReadsPerPosition(int start,
int end)
Returns the average read coverage per base for a segment, or the sequencing depth.
|
void |
baseCount() |
double |
countReadsPartiallyOverlappingWithInterval(int start,
int end)
Returns the number of reads that partially overlap with the given annotation interval.
|
double |
countReadsStriclyWithinInterval(int start,
int end)
Returns the sum of weights for reads completely contained within an interval of the reference sequence.
|
double |
geneExpressionCount(Annotation annot)
Return the sum of weights for reads that map within exons of an annotation, excluding intron counts.
|
ComputeCountInterface |
getBaseCounter()
Return the AbstractCount implementation used.
|
int |
getIndex(int searchKey,
it.unimi.dsi.fastutil.ints.IntList keyList)
For hasmap map with keylist key, find the index for the searchKey.
|
double |
getValue(int searchKey,
it.unimi.dsi.fastutil.ints.IntList keyList,
it.unimi.dsi.fastutil.ints.Int2DoubleMap map)
Returns the reweightedCount at index in a starts or ends map.
|
void |
populate(int startPosition,
int endPosition,
int readIndex)
Populate data structure for a specific alignemnt observation.
|
void |
sortReads() |
void |
startPopulating() |
public AnnotationWeightCount(WeightsInfo weights)
weights - An array whose indices are read indices and elements are weights corresponding to each read.public ComputeCountInterface getBaseCounter()
public void startPopulating()
startPopulating in interface AnnotationCountInterfacepublic final void populate(int startPosition,
int endPosition,
int readIndex)
populate in interface AnnotationCountInterfacestartPosition - position where the read starts to aligns on the reference.endPosition - position where the read stops to aligns on the reference.readIndex - index of the read in the compact reads file used as input.public void sortReads()
sortReads in interface AnnotationCountInterfacepublic final int getIndex(int searchKey,
it.unimi.dsi.fastutil.ints.IntList keyList)
searchKey - the key to look forkeyList - the list to searchpublic final double getValue(int searchKey,
it.unimi.dsi.fastutil.ints.IntList keyList,
it.unimi.dsi.fastutil.ints.Int2DoubleMap map)
searchKey - the position on chromosome to get valuekeyList - e.g. startKeys or endKeysmap - e.g. starts or ends mappublic final float averageReadsPerPosition(int start,
int end)
averageReadsPerPosition in interface AnnotationCountInterfacestart - of a segmentend - of a segmentpublic double geneExpressionCount(Annotation annot)
geneExpressionCount in interface AnnotationCountInterfaceannot - an annotation, which defines exons (segments) and introns (regions between contiguous segments).public void accumulate()
accumulate in interface AnnotationCountInterfacepublic void baseCount()
baseCount in interface AnnotationCountInterfacepublic double countReadsStriclyWithinInterval(int start,
int end)
countReadsStriclyWithinInterval in interface AnnotationCountInterfacestart - positionend - positionpublic double countReadsPartiallyOverlappingWithInterval(int start,
int end)
countReadsPartiallyOverlappingWithInterval in interface AnnotationCountInterfacestart - positionend - positionCopyright © 2017 Campagne Laboratory. All rights reserved.