List of all members.
Detailed Description
App-derived class for building and using IMM-based taxonomic classifier in the spirit of Phymm.
The main difference with Phymm is that we build IMMs for higher-level clades by pulling sequence
data for subnodes.
This class can be mostly viewed as imposing a TaxaTree structure onto ImmApp.
Member Function Documentation
def MGT::ImmClassifierApp::ImmClassifierApp::doWork |
( |
|
self, |
|
|
|
kw |
|
) |
| |
Do the actual work.
Must be redefined in the derived classes.
Should not be called directly by the user except from doWork() in a derived class.
Should work with empty keyword dict, using only self.opt.
If doing batch submision of other App instances, must return a list of sink (final) BatchJob objects.
Reimplemented from MGT::App::App.
def MGT::ImmClassifierApp::ImmClassifierApp::initWork |
( |
|
self, |
|
|
|
kw |
|
) |
| |
Perform common initialization right before doing the actual work in doWork().
Must be redefined in the derived classes.
Should not be called directly by the user except from initWork() in a derived class.
This one can create large objects because they are not passed through the batch submission,
but immediately used within the same process.
Reimplemented from MGT::App::App.
def MGT::ImmClassifierApp::ImmClassifierApp::makeOptionParserArgs |
( |
|
klass ) |
|
Return a Struct with optparse.OptionParser constructor arguments specific to the application.
The "option_list" attribute must be obtained with a sequence of calls to optparse.make_option.
Other possible attributes can be e.g. "usage".
This method will be called by parseCmdLine() and the returned "option_list" concatenated with the default
one provided by the parseCmdLine().
Must be redefined in the derived class only if there are any application specific command-line options.
Reimplemented from MGT::App::App.
def MGT::ImmClassifierApp::ImmClassifierApp::mapSeqToTree |
( |
|
self ) |
|
Assign list of SeqDB IDs to corresponding taxonomy tree nodes.
In the current SeqDB version, each ID is a unique taxonomy id, so
a one-element list will be assigned.
@post Attribute 'leafSeqDbIds' is assigned to EVERY node and contains a list of IDs, possibly empty.
The empty list will be a reference to a single shared object, so it should be treated as immutable
def MGT::ImmClassifierApp::ImmClassifierApp::parseCmdLinePost |
( |
|
klass, |
|
|
|
options, |
|
|
|
args, |
|
|
|
parser |
|
) |
| |
Optionally modify options and args in-place.
Called at the end of parseCmdLine to allow the derived classes customizing the option processing.
@param options options returned by OptionParser and converted to Struct object
@param args args returned by OptionParser
@param parser OptionParser object used to parse the command line - needed here to call its error() method
if necessary.
options should be modified in place by this method
Reimplemented from MGT::App::App.
def MGT::ImmClassifierApp::ImmClassifierApp::pickSeqOnTree |
( |
|
self, |
|
|
|
maxSeqIdCnt |
|
) |
| |
Assign to each node of the taxonomy tree the list of SeqDB IDs in the subtree under that node.
It picks a medium count of IDs from each child node and itself, clipped by maxSeqIdCnt.
def MGT::ImmClassifierApp::ImmClassifierApp::predict |
( |
|
self, |
|
|
|
kw |
|
) |
| |
Score with all IMMs and predict the taxonomy.
Parameters are taken from self.opt
@param inpSeq Name of the input multi-FASTA file to score
@param outDir Directory name for output score files
@param outScoreComb name for output file with combined scores
def MGT::ImmClassifierApp::ImmClassifierApp::reduceScores |
( |
|
self, |
|
|
|
kw |
|
) |
| |
Reduce a matrix of combined scores to best positions on the taxonomic tree.
Parameters are taken from self.opt
@param outScoreComb name for file with combined scores
@param outTaxaPred name for output file with predicted taxonomy
def MGT::ImmClassifierApp::ImmClassifierApp::train |
( |
|
self, |
|
|
|
kw |
|
) |
| |
Train all IMMs.
Parameters are taken from self.opt
Member Data Documentation
Derived classes should set this to a list of opt.mode values that can result in submision of new batch jobs.
Reimplemented from MGT::App::App.
The documentation for this class was generated from the following file:
- mgtaxa/MGT/ImmClassifierApp.py