NAME
Bio::Tools::Run::Infernal - Wrapper for local execution of cmalign, cmbuild, cmsearch, cmscore
SYNOPSIS
# parameters which are switches are set with any value that evals TRUE,# others are set to a specific valuemy $factory = Bio::Tools::Run::Infernal->new(@params);# run cmalign|cmbuild|cmsearch|cmscore|cmemit directly as a wrapper method# this resets the program flag if previously set$factory->cmsearch(@seqs); # searches Bio::PrimarySeqI's based on set cov. model# saves output to optional outfile_name, returns# Bio::SearchIO# only values which are allowed for a program are set, so one can use the same# wrapper for the following...$factory->cmalign(@seqs); # aligns Bio::PrimarySeqI's to a set cov. model,# --merge option allows two alignments generated# from the same CM to be merged.# output to outfile_name, returns Bio::AlignIO$factory->cmscore(); # scores set cov. model against Bio::PrimarySeqI,# output to outfile_name/STDOUT.$factory->cmbuild($aln); # builds covariance model based on alignment# CM to outfile_name or model_file (one is required# here), output to STDOUT.$factory->cmemit(); # emits sequence from specified cov. model;# set one if no file specified. output to# outfile_name, returns Bio::SeqIO or (if -a is set)# Bio::AlignIO$factory->cmcalibrate($file); # calibrates specified cov. model; output to# STDOUT$factory->cmstat($file); # summary stats for cov. model; set one if no file# specified; output to STDOUT# run based on the setting of the program parametermy $factory = Bio::Tools::Run::Infernal->new(-program => 'cmsearch',@params);my $search = $factory->run($seq);# using cmsearch returns a Bio::SearchIO objectwhile (my $result = $searchio->next_result){while(my $hit = $result->next_hit){while (my $hsp = $hit->next_hsp){print join("\t", ( $r->query_name,$hit->name,$hsp->hit->start,$hsp->hit->end,$hsp->meta,$hsp->score,)), "\n";}}}
DESCRIPTION
Wrapper module for Sean Eddy's Infernal suite of programs. The current implementation runs cmsearch, cmcalibrate, cmalign, cmemit, cmbuild, cmscore, and cmstat. cmsearch will return a Bio::SearchIO, cmemit a Bio::SeqIO/AlignIO, and cmalign a Bio::AlignIO. All others send output to STDOUT. Optionally, any program's output can be redirected to outfile_name.
We HIGHLY suggest upgrading to Infernal 1.0. In that spirit, this wrapper now supports parameters for Infernal 1.0 only; for wrapping older versions of Infernal we suggest using the version of Bio::Tools::Run::Infernal that came with previous versions of BioPerl-run.
NOTE: Due to conflicts in the way Infernal parameters are now formatted vs. subroutine naming in Perl (specifically the inclusion of hyphens) and due to the very large number of parameters available, setting and resetting parameters via set_parameters() and reset_parameters() is required. All valid parameters can be set, but only ones valid for the executable set via program()/program_name() are used for calling the executables, the others are silently ignored.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
AUTHOR - Chris Fields
Email: cjfields-at-uiuc-dot-edu
CONTRIBUTORS
cjfields-at-uiuc-dot-edu
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : my $wrapper = Bio::Tools::Run::Infernal->new(@params)Function: creates a new Infernal factoryReturns: Bio::Tools::Run::Infernal wrapperArgs : list of parameters
program
Title : programUsage : $obj->program()Function: Set the program called when run() is used. Synonym ofprogram_name()Returns : String (program name)Args : String (program name)Status : Unstable (may delegate to program_name, which is the interface method)
program_name
Title : program_nameUsage : $factory>program_name()Function: holds the program nameReturns: stringArgs : None
model_file
Title : model_fileUsage : $obj->model_file()Function: Set the model file used when run() is called.Returns : String (file location of covariance model)Args : String (file location of covariance model)
program_dir
Title : program_dirUsage : $factory->program_dir(@params)Function: returns the program directory, obtained from ENV variable.Returns: stringArgs :
version
Title : versionUsage : $v = $prog->version();Function: Determine the version number of the program (uses cmsearch)Example :Returns : float or undefArgs : none
run
Title : runUsage : $obj->run($seqFile)Function: Runs Infernal and returns Bio::SearchIOReturns : A Bio::SearchIOArgs : A Bio::PrimarySeqI or file name
Specific program interface methods
cmsearch
Title : cmsearchUsage : $obj->cmsearch($seqFile)Function: Runs Infernal cmsearch and returns Bio::SearchIOReturns : A Bio::SearchIOArgs : Bio::PrimarySeqI or file name
cmalign
Title : cmalignUsage : $obj->cmalign($seqFile)Function: Runs Infernal cmalign and returns Bio::AlignIOReturns : A Bio::AlignIOArgs : Bio::PrimarySeqI or file name
cmemit
Title : cmemitUsage : $obj->cmemit($modelfile)Function: Runs Infernal cmemit and returns Bio::AlignIOReturns : A Bio::AlignIOArgs : None; set model_file() to use a specific model
cmbuild
Title : cmbuildUsage : $obj->cmbuild($alignment)Function: Runs Infernal cmbuild and saves covariance modelReturns : 1 on success (no object for covariance models)Args : Bio::AlignIO with structural information (such as from Stockholmformat source) or alignment file name
cmscore
Title : cmscoreUsage : $obj->cmscore($seq)Function: Runs Infernal cmscore and saves outputReturns : NoneArgs : None; set model_file() to use a specific model
cmcalibrate
Title : cmcalibrateUsage : $obj->cmcalibrate('file')Function: Runs Infernal calibrate on specified CMReturns : NoneArgs : None; set model_file() to use a specific model
cmstat
Title : cmstatUsage : $obj->cmstat($seq)Function: Runs Infernal cmstat and saves outputReturns : NoneArgs : None; set model_file() to use a specific model
Bio::ParameterBaseI-specific methods
These methods are part of the Bio::ParameterBaseI interface
set_parameters
Title : set_parametersUsage : $pobj->set_parameters(%params);Function: sets the parameters listed in the hash or arrayReturns : NoneArgs : [optional] hash or array of parameter/values. These can optionallybe hash or array referencesNote : This only sets parameters; to set methods use the method name
reset_parameters
Title : reset_parametersUsage : resets valuesFunction: resets parameters to either undef or value in passed hashReturns : noneArgs : [optional] hash of parameter-value pairs
validate_parameters
Title : validate_parametersUsage : $pobj->validate_parameters(1);Function: sets a flag indicating whether to validate parameters viaset_parameters() or reset_parameters()Returns : BoolArgs : [optional] value evaluating to True/FalseNote : Optionally implemented method; up to the implementation on whetherto automatically validate parameters or optionally do so
parameters_changed
Title : parameters_changedUsage : if ($pobj->parameters_changed) {...}Function: Returns boolean true (1) if parameters have changedReturns : Boolean (0 or 1)Args : NoneNote : This module does not run state checks, so this always returns True
available_parameters
Title : available_parametersUsage : @params = $pobj->available_parameters()Function: Returns a list of the available parametersReturns : Array of parametersArgs : [optional] name of executable being used; defaults to returning allavailable parameters
get_parameters
Title : get_parametersUsage : %params = $pobj->get_parameters;Function: Returns list of set key-value pairs, parameter => valueReturns : List of key-value pairsArgs : [optional]'full' - this option returns everything associated with the parameteras an array ref value; that is, not just the value but alsothe value, type, and prefix. Default is value only.'valid'- same a 'full', but only returns the grouping valid for thecurrently set executable
to_* methods
All to_* methods are implementation-specific
to_exe_string
Title : to_exe_stringUsage : $string = $pobj->to_exe_string;Function: Returns string (command line string in this case)Returns : StringArgs :
_writeSeqFile
Title : _writeSeqFileUsage : obj->_writeSeqFile($seq)Function: Internal(not to be used directly)Returns :Args :
_writeAlignFile
Title : _writeAlignFileUsage : obj->_writeAlignFile($seq)Function: Internal(not to be used directly)Returns :Args :