public class PhiScoreDriver extends BeamDriver
Modifier and Type | Class and Description |
---|---|
protected class |
PhiScoreDriver.SuffixFilter
A FilenameFilter that makes sure the file has either the MOTIF_SUFFIX or MOTIF_LIST_SUFFIX and that the name contains at least two
words seperated by _.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MOTIF_LIST_SUFFIX
The suffix that files containing MotifLists must have to be interpretted properly.
|
static java.lang.String |
MOTIF_SUFFIX
The suffix that files containing motifs must have to be interpretted properly.
|
AMBIGUIZER_NAME, BEAM_NAME, BIPARTITE_NAME, bpScorer, error, fileRoot, knownMotifs, MERGED_NAME, properties, scorer, scorerInfoMap, subtestID, testID, verboseSave
Constructor and Description |
---|
PhiScoreDriver(java.lang.String threadID,
UberProperties properties)
Sets the file root, test ID, thread ID, properties, and scorer.
|
PhiScoreDriver(java.lang.String threadID,
UberProperties properties,
int[] group)
Sets the file root, test ID, thread ID, properties, and scorer; uses the specified group instead of pulling the group ID from the
properties.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Calls scoreFile on each file in the root directory that passes
PhiScoreDriver.SuffixFilter . |
void |
scoreFile(java.lang.String filename)
Calculates a phi score for the motifs in filename.
|
private void |
setFlags(MotifList[] ml,
boolean flag)
Sets all the motif in all the motif lists of ml to flag.
|
getScorer, printBestMotif, refineBipartite, runAmbiguizerEtc, runBeamEtc, runBeamPlus, runBipartitesEtc, runFilterEtc, runMergeEtc, saveFilterResults, saveProperties, saveResults, saveSpecialStats, setFastaMotifFinder, setMostParams, setVerboseSave
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final java.lang.String MOTIF_LIST_SUFFIX
public static final java.lang.String MOTIF_SUFFIX
public PhiScoreDriver(java.lang.String threadID, UberProperties properties) throws UnknownGeneException
UnknownGeneException
public PhiScoreDriver(java.lang.String threadID, UberProperties properties, int[] group)
public void run()
PhiScoreDriver.SuffixFilter
. Throws IllegalArgumentExceptions if
the root is not a directory.run
in interface java.lang.Runnable
run
in class BeamDriver
public void scoreFile(java.lang.String filename)
If the suffix is MOTIF_LIST_SUFFIX, then the file is assumed to contain MotifLists. In this case, each block of motifs, delimited by
blank lines, is read in as one motif list, as carried out by FileReaders.readMotifLists(String)
. Otherwse, the suffix is
assumed to be MOTIF_SUFFIX, in which case the motifs are read in as single motifs, as carried out by
FileReaders.readMotifs(String, boolean, Alphabet)
.
In both cases, each line can either be just a string of characters, in which case it is read in as a motif with little 'r', or as a full motif, allowing you to specify 'r' or 'R'.
private void setFlags(MotifList[] ml, boolean flag)