NAME
Bio::Tools::Run::AssemblerBase - base class for wrapping external assemblers
SYNOPSIS
Give standard usage here
DESCRIPTION
Describe the object here # use of globals for configuration... # I've created the separate Config.pm module, and 'use'd it in the # main module, for instance... # other configuration globals: # $use_dash = [1|single|double|mixed]
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 the Bioperl mailing list. 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 of the bugs and their resolution. Bug reports can be submitted via the web:
http://redmine.open-bio.org/projects/bioperl/
AUTHOR - Florent Angly
Email florent dot angly at gmail dot com
CONTRIBUTORS
Mark A. Jensen - maj -at- fortinbras -dot- us
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
program_name
Title : program_nameUsage : $assembler>program_name()Function: get/set the executable nameReturns: stringArgs : string
program_dir
Title : program_dirUsage : $assembler->program_dir()Function: get/set the program dirReturns: stringArgs : string
out_type
Title : out_typeUsage : $assembler->out_type('Bio::Assembly::ScaffoldI')Function: get/set the desired type of outputReturns : The type of results to returnArgs : Type of results to return (optional):'Bio::Assembly::IO' object'Bio::Assembly::ScaffoldI' object (default)The name of a file to save the results in
_assembly_format
Title : _assembly_formatUsage : $assembler->_assembly_format('ace')Function: get/set the driver to use to parse the assembly resultsReturns : the driver to use to parse the assembly resultsArgs : the driver to use to parse the assembly results (optional)
_assembly_variant
Title : _assembly_variantUsage : $assembler->_assembly_variant('454')Function: get/set the driver variant to use to parse the assembly results. Forexample, the ACE format has the ACE-454 and the ACE-consed variantsReturns : the driver variant to use to parse the assembly resultsArgs : the driver variant to use to parse the assembly results (optional)
_check_executable
Title : _check_executableUsage : $assembler->_check_executable()Function: Verifies that the program executable can be found, or throw an error.Returns: 1 for successArgs : -
_check_sequence_input
Title : _check_sequence_inputUsage : $assembler->_check_sequence_input($seqs)Function: Check that the sequence input is a valid file, or an arrayref ofsequence objects (Bio::PrimarySeqI or Bio::SeqI). If not, anexception is thrown.Returns : 1 if the check passedArgs : sequence input
_check_optional_quality_input
Title : _check_optional_quality_inputUsage : $assembler->_check_optional_quality_input($quals)Function: If a quality score input is provided, check that it is either avalid file or an arrayref of quality score objects (Bio::Seq::QualI or Bio::Seq::Quality). If not, an exception is thrown.Returns : 1 if the check passed (or quality score input was provided)Args : quality score input
_prepare_input_file
Title : _prepare_input_fileUsage : ($fasta_file, $qual_file) = $assembler->_prepare_input_file(\@seqs, \@quals);Function: Create the input FASTA and QUAL files as needed. If the inputsequences are provided in a (FASTA) file, the optional input qualityscores are also expected to be in a (QUAL) file. If the inputsequences are an arrayref of bioperl sequence objects, the optionalinput quality scores are expected to be an arrayref of bioperlquality score objects, in the same order as the sequence objects.Returns : - input filehandle- input filenameArgs : - sequence input (FASTA file or sequence object arrayref)- optional quality score input (QUAL file or quality score objectarrayref)
_write_seq_file
Title : _write_seq_fileUsage : ($fasta_file, $qual_file) = $assembler->_write_seq_file(\@seqs, \@quals)Function: Write temporary FASTA and QUAL files on diskReturns : name of FASTA filename of QUAL file (undef if no quality scoress)Args : - arrayref of sequence objects- optional arrayref of quality score objects
_prepare_output_file
Title : _prepare_output_fileUsage : ($out_fh, $out_file) = $assembler->_prepare_output_file( );Function: Prepare the output fileReturns : - output filehandle- output filenameArgs : none
_export_results
Title : _export_resultsUsage : $results = $assembler->_export_results($asm_file);Function: Export the assembly resultsReturns : Exported assembly (file or IO object or assembly object)Args : -Name of the file containing an assembly- -keep_asm => boolean (if true, do not unlink $asm_file)-[optional] additional named args required by the B:A:IO object
_register_program_commands()
Title : _register_program_commandsUsage : $assembler->_register_program_commands( \@commands, \%prefixes )Function: Register the commands a program accepts (for programs that actas frontends for a set of commands, each command having its ownset of params/switches)Returns : true on successArgs : arrayref to a list of commands (scalar strings),hashref to a translation table of the form{ $prefix1 => $command1, ... } [optional]Note : To implement a program with this kind of calling structure,include a parameter called 'command' in the@program_params globalNote : The translation table is used to associate parameters andswitches specified in _set_program_options with the correctprogram command. In the globals @program_params and@program_switches, specify elements as 'prefix1|param' and'prefix1|switch', etc.
_set_program_options
Title : _set_program_optionsUsage : $assembler->_set_program_options( \@ args );Function: Register the parameters and flags that an assembler takes.Returns : 1 for successArgs : - arguments passed by the user- parameters that the program accepts, optional (default: none)- switches that the program accepts, optional (default: none)- parameter translation, optional (default: no translation occurs)- dash option for the program parameters, [1|single|double|mixed],optional (default: yes, use single dashes only)- join, optional (default: ' ')
_translate_params
Title : _translate_paramsUsage : @options = $assembler->_translate_params( );Function: Translate the Bioperl arguments into the arguments to pass to theassembler on the command lineReturns : Arrayref of argumentsArgs : none
_prepare_input_sequences
Title : _prepare_input_sequencesUsage : ($seqs, $quals) = $assembler->_prepare_input_sequences(\@seqs, \@quals);Function: Do something to the input sequence and qual objects. By default,nothing happens. Overload this method in the specific assembly moduleif processing of the sequences is needed (e.g. as in theTigrAssembler module).Returns : - sequence input- optional quality score inputArgs : - sequence input (FASTA file or sequence object arrayref)- optional quality score input (QUAL file or quality score objectarrayref)
_collate_subcmd_args()
Title : _collate_subcmd_argsUsage : $args_hash = $self->_collate_subcmd_argsFunction: collate parameters and switches into command-specificarg lists for passing to new()Returns : hash of named argument listsArgs : [optional] composite cmd prefix (scalar string)[default is 'run']
run
Title : runUsage : $assembly = $assembler->run(\@seqs, \@quals);or$assembly = $assembler->run($fasta_file, $qual_file);Function: Run the assembler. The specific assembler wrapper needs to providethe $assembler->_run() method.Returns : Assembly results (file, IO object or Assembly object)Args : - sequence input (FASTA file or sequence object arrayref)- optional quality score input (QUAL file or quality score objectarrayref)
Bio:ParameterBaseI compliance
set_parameters()
Title : set_parametersUsage : $pobj->set_parameters(%params);Function: sets the parameters listed in the hash or arrayReturns : true on successArgs : [optional] hash or array of parameter/values.
reset_parameters()
Title : reset_parametersUsage : resets valuesFunction: resets parameters to either undef or value in passed hashReturns : noneArgs : [optional] hash of parameter-value pairs
parameters_changed()
Title : parameters_changedUsage : if ($pobj->parameters_changed) {...}Function: Returns boolean true (1) if parameters have changedReturns : Boolean (0 or 1)Args : [optional] Boolean
available_parameters()
Title : available_parametersUsage : @params = $pobj->available_parameters()Function: Returns a list of the available parametersReturns : Array of parametersArgs : 'params' for settable program parameters'switches' for boolean program switchesdefault: all
get_parameters()
Title : get_parametersUsage : %params = $pobj->get_parameters;Function: Returns list of key-value pairs of parameter => valueReturns : List of key-value pairsArgs : [optional] A string is allowed if subsets are wanted or (if aparameter subset is default) 'all' to return all parameters