Package org.snpeff.stats
Class ReadsOnMarkersModel
- java.lang.Object
-
- org.snpeff.stats.ReadsOnMarkersModel
-
public class ReadsOnMarkersModel extends java.lang.Object
Calculate the maximum interval length by type, for all markers in a genome Create a probability model based on binomial ditribution.- Author:
- pcingola
-
-
Constructor Summary
Constructors Constructor Description ReadsOnMarkersModel(SnpEffectPredictor snpEffectPredictor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
countBases()
Count bases covered for each marker typeCountByType
getCountBases()
CountByType
getCountMarkers()
CountByType
getProb()
CountByType
getRawCountBases()
CountByType
getRawCountMarkers()
void
load(java.lang.String fileName)
Load data from a filevoid
randomSampling(int iterations, int readLen, int numReads)
Sample and calculate the probability of hitting each type of marker (marker.class).boolean
run()
Runvoid
save(java.lang.String fileName)
Save model to filevoid
setMarkerTypes(MarkerTypes markerTypes)
void
setNumIterations(int numIterations)
void
setNumReads(int numReads)
void
setReadLength(int readLength)
void
setSnpEffectPredictor(SnpEffectPredictor snpEffectPredictor)
void
setVerbose(boolean verbose)
java.lang.String
toString()
-
-
-
Constructor Detail
-
ReadsOnMarkersModel
public ReadsOnMarkersModel(SnpEffectPredictor snpEffectPredictor)
-
-
Method Detail
-
countBases
public void countBases()
Count bases covered for each marker type
-
getCountBases
public CountByType getCountBases()
-
getCountMarkers
public CountByType getCountMarkers()
-
getProb
public CountByType getProb()
-
getRawCountBases
public CountByType getRawCountBases()
-
getRawCountMarkers
public CountByType getRawCountMarkers()
-
load
public void load(java.lang.String fileName)
Load data from a file- Parameters:
fileName
-
-
randomSampling
public void randomSampling(int iterations, int readLen, int numReads)
Sample and calculate the probability of hitting each type of marker (marker.class). Creates 'numReads' reads of size 'readLen' and count how many of them hit each marker type. Iterate 'iterations' times to obtain a distribution.
-
run
public boolean run()
Run- Returns:
-
save
public void save(java.lang.String fileName)
Save model to file- Parameters:
fileName
-
-
setMarkerTypes
public void setMarkerTypes(MarkerTypes markerTypes)
-
setNumIterations
public void setNumIterations(int numIterations)
-
setNumReads
public void setNumReads(int numReads)
-
setReadLength
public void setReadLength(int readLength)
-
setSnpEffectPredictor
public void setSnpEffectPredictor(SnpEffectPredictor snpEffectPredictor)
-
setVerbose
public void setVerbose(boolean verbose)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-