Package org.snpeff.stats
Class ReadsOnMarkersModel
- java.lang.Object
-
- org.snpeff.stats.ReadsOnMarkersModel
-
public class ReadsOnMarkersModel extends java.lang.ObjectCalculate 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 voidcountBases()Count bases covered for each marker typeCountByTypegetCountBases()CountByTypegetCountMarkers()CountByTypegetProb()CountByTypegetRawCountBases()CountByTypegetRawCountMarkers()voidload(java.lang.String fileName)Load data from a filevoidrandomSampling(int iterations, int readLen, int numReads)Sample and calculate the probability of hitting each type of marker (marker.class).booleanrun()Runvoidsave(java.lang.String fileName)Save model to filevoidsetMarkerTypes(MarkerTypes markerTypes)voidsetNumIterations(int numIterations)voidsetNumReads(int numReads)voidsetReadLength(int readLength)voidsetSnpEffectPredictor(SnpEffectPredictor snpEffectPredictor)voidsetVerbose(boolean verbose)java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-