public class AffinityEvaluatorDriver
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
AffinityEvaluatorDriver.AffinityFileFilter
A file filter that accepts only affinity files.
|
private static class |
AffinityEvaluatorDriver.BackgroundEvalFunc
Just a special designation that this requires a background.
|
private static interface |
AffinityEvaluatorDriver.EvaluatorFunction |
private static class |
AffinityEvaluatorDriver.FPFNEvalFunc |
private static class |
AffinityEvaluatorDriver.ROCEvalFunc
Only allows ProbCREModel's to be scored.
|
private static class |
AffinityEvaluatorDriver.SiteFileFilter
A file filter that accepts only site files and affinity files.
|
private static class |
AffinityEvaluatorDriver.TestModel |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
AFFINITY_FILE_SUFFIX |
private static int |
AUTO_TRAINING_SIZE |
private static double[] |
BACKGROUND |
private static boolean |
BOOT_STRAP |
private static CREModel |
CONS_CRE |
static java.lang.String |
DIR |
private static int |
FOLD |
private static CREModel |
KMM_CRE |
private static KRModel |
KR_CRE |
private static double |
MIN_AFFINITY |
private static int |
NUM_RAND |
private static CREModel |
PL_CONS_CRE |
private static boolean |
PLOT_ROC |
private static boolean |
PRINT |
private static CREModel |
PWM_CRE |
private static java.lang.String |
SITE_FILE_SUFFIX |
private static boolean |
TEST_ON_ALL |
private static boolean |
TRUE_X_VAL |
Constructor and Description |
---|
AffinityEvaluatorDriver() |
Modifier and Type | Method and Description |
---|---|
private static AveStatBox |
bootStrap(CREModel templateCRE,
MotifList positives,
AffinityEvaluatorDriver.EvaluatorFunction eval,
int fold,
int trainingSize)
Likst crossValidate, only trainig sets are randomly chosen each time, independent of the last iteration.
|
private static CREModel |
buildCRE(CREModel templateCRE,
MotifList source)
Builds a CREModel form the given MotifList using
CREModel.newInstanceOf(MotifList) . |
private static AveStatBox |
crossValidate(CREModel templateCRE,
MotifList positives,
AffinityEvaluatorDriver.EvaluatorFunction eval,
int fold,
int trainingSize) |
private static MotifList |
filterOnAffinity(MotifList ml,
double minAff) |
private static MotifList |
getSubset(Motif[] marr,
int start,
int length)
Gets a continuous subset of length
length from marr starting at start and wrapping when the end
of the array is reached. |
static void |
main(java.lang.String[] args)
Runs the current evaluation and returns the results in a StatBox.
|
private static MotifList |
makeRandoms(MotifList positives,
int numRands) |
private static Motif |
readMotif(Scanner reader)
Assumes the only thing in the reader is a motif.
|
private static MotifList |
readMotifList(java.io.File file) |
private static MotifList |
readUniqMotifList(java.io.File file)
Reads motifs from the file, removes duplicates, then returns the result as a list.
|
private static void |
testModels(AffinityEvaluatorDriver.TestModel[] models,
java.io.File[] files,
AffinityEvaluatorDriver.EvaluatorFunction eval,
double trainingSetRatio,
boolean print) |
private static final java.lang.String AFFINITY_FILE_SUFFIX
private static final int AUTO_TRAINING_SIZE
private static final double[] BACKGROUND
private static final boolean BOOT_STRAP
private static final CREModel CONS_CRE
public static final java.lang.String DIR
private static final int FOLD
private static final CREModel KMM_CRE
private static final KRModel KR_CRE
private static final double MIN_AFFINITY
private static final int NUM_RAND
private static final CREModel PL_CONS_CRE
private static final boolean PLOT_ROC
private static final boolean PRINT
private static final CREModel PWM_CRE
private static final java.lang.String SITE_FILE_SUFFIX
private static final boolean TEST_ON_ALL
private static final boolean TRUE_X_VAL
private static AveStatBox bootStrap(CREModel templateCRE, MotifList positives, AffinityEvaluatorDriver.EvaluatorFunction eval, int fold, int trainingSize)
private static CREModel buildCRE(CREModel templateCRE, MotifList source)
CREModel.newInstanceOf(MotifList)
.private static AveStatBox crossValidate(CREModel templateCRE, MotifList positives, AffinityEvaluatorDriver.EvaluatorFunction eval, int fold, int trainingSize)
private static MotifList getSubset(Motif[] marr, int start, int length)
length
from marr
starting at start
and wrapping when the end
of the array is reached.public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
private static Motif readMotif(Scanner reader)
Alphabet.FULL
with no flags. Reverse
compliment is assumed to be false.private static MotifList readMotifList(java.io.File file)
private static MotifList readUniqMotifList(java.io.File file)
private static void testModels(AffinityEvaluatorDriver.TestModel[] models, java.io.File[] files, AffinityEvaluatorDriver.EvaluatorFunction eval, double trainingSetRatio, boolean print)