public class DifferentialExpressionCalculator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DifferentialExpressionCalculator.ElementType |
| Constructor and Description |
|---|
DifferentialExpressionCalculator() |
| Modifier and Type | Method and Description |
|---|---|
void |
associateSampleToGroup(String sample,
String group) |
double |
calculateNormalized(double readCountInt,
int annotLength,
double normalizationFactor) |
double |
calculateNormalized(int readCountInt,
int annotLength,
double normalizationFactor) |
DifferentialExpressionResults |
compare(DifferentialExpressionResults results,
NormalizationMethod method,
StatisticCalculator tester,
GroupComparison comparison) |
DifferentialExpressionResults |
compare(DifferentialExpressionResults results,
NormalizationMethod method,
StatisticCalculator tester,
String... group) |
DifferentialExpressionResults |
compare(StatisticCalculator tester,
NormalizationMethod method,
String... group) |
void |
createDefaultGroup()
Associate each sample to the default group "all-samples".
|
int |
defineElement(String label)
Define an element but don't specify the type.
|
int |
defineElement(String label,
DifferentialExpressionCalculator.ElementType type)
Define an element and it's type.
|
void |
defineElementLength(int elementIndex,
int length)
Define the number of sequence bases that this element spans.
|
void |
defineGroup(String label) |
it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.lang.MutableString> |
getElementIds() |
int |
getElementIndex(String elementId)
Return the element index of element identified by id.
|
it.unimi.dsi.fastutil.ints.Int2IntMap |
getElementLabelToElementTypeMap() |
int |
getElementLength(it.unimi.dsi.lang.MutableString elementId)
Return the length of an element.
|
DifferentialExpressionCalculator.ElementType |
getElementType(it.unimi.dsi.lang.MutableString elementId)
Return the type of the element.
|
String |
getGroup(String sampleId)
Get the group that the sample belongs to.
|
double |
getNormalizedExpressionValue(String sampleId,
NormalizationMethod normalizationMethod,
it.unimi.dsi.lang.MutableString elementId)
Get the normalized expression value an element in a given sample.
|
long |
getNumAlignedInSample(String sampleId)
Return the number of alignment entries found in the sample.
|
int |
getOverlapCount(String sample,
it.unimi.dsi.lang.MutableString elementId)
Get the stored overlap count for an element in a given sample.
|
double |
getSampleProportion(String sample)
Returns the proportion of counts that originate from a certain sample.
|
it.unimi.dsi.fastutil.objects.ObjectArraySet<String> |
getSamples(String groupId)
Returns the sample ids that belong to a group.
|
Map<String,String> |
getSampleToGroupMap()
Get the sampleToGroupMap object.
|
int |
getSumOverlapCounts(String sample)
Returns the sum of counts in a given sample.
|
boolean |
isRunInParallel() |
void |
observe(String sample,
String elementId,
double count)
Observe counts for a specific element and sample.
|
void |
observe(String sample,
String elementId,
int count)
Observe counts for a sample.
|
void |
reserve(int elementsPerSample,
int numberOfSamples)
Reserve storage for specified number of elements and samples.
|
void |
resetSumOverlapCounts()
Force the recalculation of SumOverlapCounts.
|
String[] |
samples() |
void |
setNumAlignedInSample(String sampleId,
long numAlignedInSamples)
Define the number of alignment entries found in each sample.
|
void |
setRunInParallel(boolean runInParallel) |
public boolean isRunInParallel()
public void setRunInParallel(boolean runInParallel)
public DifferentialExpressionCalculator.ElementType getElementType(it.unimi.dsi.lang.MutableString elementId)
elementId - public void resetSumOverlapCounts()
public void createDefaultGroup()
public double calculateNormalized(int readCountInt,
int annotLength,
double normalizationFactor)
public double calculateNormalized(double readCountInt,
int annotLength,
double normalizationFactor)
public void defineGroup(String label)
public int defineElement(String label)
label - element-idpublic int defineElement(String label, DifferentialExpressionCalculator.ElementType type)
label - element-idtype - the type (gene, exon, ...)public it.unimi.dsi.fastutil.ints.Int2IntMap getElementLabelToElementTypeMap()
public void defineElementLength(int elementIndex,
int length)
elementIndex - index of the element associated with length.length - length of the element.public int getElementLength(it.unimi.dsi.lang.MutableString elementId)
elementId - public void observe(String sample, String elementId, double count)
sample - sample id.elementId - element id.count - Number of reads that can be assigned to the element.public void observe(String sample, String elementId, int count)
sample - sample id.elementId - element id.count - Number of reads that can be assigned to the element.public int getElementIndex(String elementId)
elementId - id of the element.public void setNumAlignedInSample(String sampleId, long numAlignedInSamples)
sampleId - The samplenumAlignedInSamples - The number of alignment entries observed in the sample.public long getNumAlignedInSample(String sampleId)
sampleId - Identifier of the sample.public Map<String,String> getSampleToGroupMap()
public String getGroup(String sampleId)
sampleId - Id of the sample.public DifferentialExpressionResults compare(DifferentialExpressionResults results, NormalizationMethod method, StatisticCalculator tester, GroupComparison comparison)
public DifferentialExpressionResults compare(DifferentialExpressionResults results, NormalizationMethod method, StatisticCalculator tester, String... group)
public DifferentialExpressionResults compare(StatisticCalculator tester, NormalizationMethod method, String... group)
public void reserve(int elementsPerSample,
int numberOfSamples)
elementsPerSample - numberOfSamples - public it.unimi.dsi.fastutil.objects.ObjectArraySet<String> getSamples(String groupId)
groupId - Id of the group.public it.unimi.dsi.fastutil.objects.ObjectSet<it.unimi.dsi.lang.MutableString> getElementIds()
public double getNormalizedExpressionValue(String sampleId, NormalizationMethod normalizationMethod, it.unimi.dsi.lang.MutableString elementId)
NormalizationMethod.getNormalizedExpressionValue(DifferentialExpressionCalculator, String, it.unimi.dsi.lang.MutableString)
method.sampleId - sample identifiernormalizationMethod - Normalization method (adjusts the denominator of the RPKM value).elementId - the element for which a normalized expression value is sought.public int getOverlapCount(String sample, it.unimi.dsi.lang.MutableString elementId)
sample - elementId - public int getSumOverlapCounts(String sample)
sample - public String[] samples()
public double getSampleProportion(String sample)
sample - Copyright © 2018 Campagne Laboratory. All rights reserved.