Package picard.analysis
Class TheoreticalSensitivity
java.lang.Object
picard.analysis.TheoreticalSensitivity
Created by David Benjamin on 5/13/15.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<TheoreticalSensitivityMetrics>
calculateSensitivities
(int simulationSize, htsjdk.samtools.util.Histogram<Integer> depthHistogram, htsjdk.samtools.util.Histogram<Integer> baseQHistogram, List<Double> alleleFractions) This is a utility function to calculate the metrics specific to running theoretical sensitivity over several different allele fractions.hetAltDepthDistribution
(int N) static double
hetSNPSensitivity
(double[] depthDistribution, double[] qualityDistribution, int sampleSize, double logOddsThreshold) static double
hetSNPSensitivity
(double[] depthDistribution, double[] qualityDistribution, int sampleSize, double logOddsThreshold, boolean withLogging) static double[]
normalizeHistogram
(htsjdk.samtools.util.Histogram<Integer> histogram) static double
sensitivityAtConstantDepth
(int depth, htsjdk.samtools.util.Histogram<Integer> qualityHistogram, double logOddsThreshold, int sampleSize, double alleleFraction, long randomSeed) Calculates the theoretical sensitivity with a given Phred-scaled quality score distribution at a constant depth.static double
theoreticalSensitivity
(htsjdk.samtools.util.Histogram<Integer> depthHistogram, htsjdk.samtools.util.Histogram<Integer> qualityHistogram, int sampleSize, double logOddsThreshold, double alleleFraction) Calculates the theoretical sensitivity with a given Phred-scaled quality score distribution and depth distribution.
-
Constructor Details
-
TheoreticalSensitivity
public TheoreticalSensitivity()
-
-
Method Details
-
hetSNPSensitivity
public static double hetSNPSensitivity(double[] depthDistribution, double[] qualityDistribution, int sampleSize, double logOddsThreshold) - Parameters:
depthDistribution
- the probability of depth n is depthDistribution[n] for n = 0, 1. . . N - 1qualityDistribution
- the probability of quality q is qualityDistribution[q] for q = 0, 1. . . QsampleSize
- sample size is the number of random sums of quality scores for each mlogOddsThreshold
- is the log_10 of the likelihood ratio required to call a SNP, for example 5 if the variant likelihood must be 10^5 times greater
-
hetSNPSensitivity
public static double hetSNPSensitivity(double[] depthDistribution, double[] qualityDistribution, int sampleSize, double logOddsThreshold, boolean withLogging) - Parameters:
depthDistribution
- the probability of depth n is depthDistribution[n] for n = 0, 1. . . N - 1qualityDistribution
- the probability of quality q is qualityDistribution[q] for q = 0, 1. . . QsampleSize
- sample size is the number of random sums of quality scores for each mlogOddsThreshold
- is the log_10 of the likelihood ratio required to call a SNP, for example 5 if the variant likelihood must be 10^5 times greater.withLogging
- true to output log messages, false otherwise.
-
proportionsAboveThresholds
-
hetAltDepthDistribution
-
normalizeHistogram
-
sensitivityAtConstantDepth
public static double sensitivityAtConstantDepth(int depth, htsjdk.samtools.util.Histogram<Integer> qualityHistogram, double logOddsThreshold, int sampleSize, double alleleFraction, long randomSeed) Calculates the theoretical sensitivity with a given Phred-scaled quality score distribution at a constant depth.- Parameters:
depth
- Depth to compute sensitivity atqualityHistogram
- Phred-scaled quality score histogramlogOddsThreshold
- Log odd threshold necessary for variant to be calledsampleSize
- sampleSize is the total number of simulations to runalleleFraction
- the allele fraction to evaluate sensitivity atrandomSeed
- random number seed to use for random number generator- Returns:
- Theoretical sensitivity for the given arguments at a constant depth.
-
theoreticalSensitivity
public static double theoreticalSensitivity(htsjdk.samtools.util.Histogram<Integer> depthHistogram, htsjdk.samtools.util.Histogram<Integer> qualityHistogram, int sampleSize, double logOddsThreshold, double alleleFraction) Calculates the theoretical sensitivity with a given Phred-scaled quality score distribution and depth distribution.- Parameters:
depthHistogram
- Depth histogram to compute theoretical sensitivity overqualityHistogram
- Phred-scaled quality score histogramsampleSize
- the total number of simulations to runlogOddsThreshold
- Log odds threshold necessary for variant to be calledalleleFraction
- the allele fraction to evaluate sensitivity at- Returns:
- Theoretical sensitivity for the given arguments over a particular depth distribution.
-
calculateSensitivities
public static List<TheoreticalSensitivityMetrics> calculateSensitivities(int simulationSize, htsjdk.samtools.util.Histogram<Integer> depthHistogram, htsjdk.samtools.util.Histogram<Integer> baseQHistogram, List<Double> alleleFractions) This is a utility function to calculate the metrics specific to running theoretical sensitivity over several different allele fractions.- Parameters:
simulationSize
- Number of simulations to run at each depth.depthHistogram
- Histogram of depth distribution.baseQHistogram
- Histogram of Phred-scaled quality scores.alleleFractions
- List of allele fractions to measure theoretical sensitivity over.
-