Public Member Functions | Static Public Attributes

MGT::Proj::PhHostGosApp::PhHostGosApp Class Reference

Inheritance diagram for MGT::Proj::PhHostGosApp::PhHostGosApp:
MGT::App::App

List of all members.

Public Member Functions

def parseCmdLinePost
def initWork
def doWork
def makeCustomTaxaTreeAndSeqDb
def trainImmsGos
def scoreImmsGos
def processImmScores
def predictByScore
def exportPred
def loadMgtTaxaRefSql
def loadMetaRefSql
def statsPred

Static Public Attributes

tuple batchDepModes = ("score-imms-gos","train-imms-gos")
 Derived classes should set this to a list of opt.mode values that can result in submision of new batch jobs.

Detailed Description

App-derived class GOS-specific prediction of bacterial hosts for the viral sequences

Member Function Documentation

def MGT::Proj::PhHostGosApp::PhHostGosApp::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::Proj::PhHostGosApp::PhHostGosApp::exportPred (   self,
  kw 
)
Export predictions for downstream analysis.
This loads CSV files from PhageHostApp and joins it 
with APIS assignments for host metagenomic sequences,
and then saves as CSV again.
Parameters are taken from self.opt.
@param predOutTaxaCsvRef CSV prediction file produced by PhageHostApp based only on Ref DB
@param predOutTaxaCsvGos CSV prediction file produced by PhageHostApp based only on Gos scaffolds
@param predOutTaxaCsvComb CSV prediction file produced by PhageHostApp based on both Ref DB and Gos scaffolds
@param predOutTaxametaCsv CSV prediction file for final output
@param taxaFileGos custom taxonomy tree with metagenomic scaffolds/contigs
def MGT::Proj::PhHostGosApp::PhHostGosApp::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::Proj::PhHostGosApp::PhHostGosApp::loadMetaRefSql (   self )
Load annotations for metagenomic bacterial references into SQL tables.
Currently loads file with APIS predictions projected onto scaffolds.
def MGT::Proj::PhHostGosApp::PhHostGosApp::loadMgtTaxaRefSql (   self )
Load MGTAXA taxonomic assignments for metagenomic bacterial references into SQL tables.
def MGT::Proj::PhHostGosApp::PhHostGosApp::makeCustomTaxaTreeAndSeqDb (   self,
  kw 
)
Add metagenomic sequences as custom nodes to the taxonomy tree and save the tree, and also create SeqDbFasta for them
def MGT::Proj::PhHostGosApp::PhHostGosApp::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::Proj::PhHostGosApp::PhHostGosApp::predictByScore (   self,
  scoreFileRef,
  scoreFileGos,
  scoreFileComb,
  kw 
)
Predict host by using a given score file and export predictions.
def MGT::Proj::PhHostGosApp::PhHostGosApp::processImmScores (   self,
  kw 
)
Predict host taxonomy from IMM scores from RefSeq and Env contig models
def MGT::Proj::PhHostGosApp::PhHostGosApp::scoreImmsGos (   self,
  kw 
)
Score against IMMs trained on bacterial scaffolds from the metagenome.
For metagenomic scaffolds, we only train for leaf sequences. This
is why we use ImmApp directly instead of higher level ImmClassifierApp
def MGT::Proj::PhHostGosApp::PhHostGosApp::statsPred (   self,
  kw 
)
Create aggregate tables and csv files to show various relationships between predictions
def MGT::Proj::PhHostGosApp::PhHostGosApp::trainImmsGos (   self,
  kw 
)
Train IMMs on bacterial scaffolds from the metagenome.
For metagenomic scaffolds, we only train for leaf sequences. This
is why we use ImmApp directly instead of higher level ImmClassifierApp

Member Data Documentation

tuple MGT::Proj::PhHostGosApp::PhHostGosApp::batchDepModes = ("score-imms-gos","train-imms-gos") [static]

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: