.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Tools::Run::StandAloneBlast 3pm" .TH Bio::Tools::Run::StandAloneBlast 3pm "2021-01-06" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Tools::Run::StandAloneBlast \- Object for the local execution of the NCBI BLAST program suite (blastall, blastpgp, bl2seq). There is experimental support for WU\-Blast and NCBI rpsblast. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& # Local\-blast "factory object" creation and blast\-parameter \& # initialization: \& @params = (\-database => \*(Aqswissprot\*(Aq, \-outfile => \*(Aqblast1.out\*(Aq); \& $factory = Bio::Tools::Run::StandAloneBlast\->new(@params); \& \& # Blast a sequence against a database: \& $str = Bio::SeqIO\->new(\-file=>\*(Aqt/amino.fa\*(Aq, \-format => \*(AqFasta\*(Aq); \& $input = $str\->next_seq(); \& $input2 = $str\->next_seq(); \& $blast_report = $factory\->blastall($input); \& \& # Run an iterated Blast (psiblast) of a sequence against a database: \& $factory\->j(3); # \*(Aqj\*(Aq is blast parameter for # of iterations \& $factory\->outfile(\*(Aqpsiblast1.out\*(Aq); \& $factory = Bio::Tools::Run::StandAloneBlast\->new(@params); \& $blast_report = $factory\->blastpgp($input); \& \& # Use blast to align 2 sequences against each other: \& $factory = Bio::Tools::Run::StandAloneBlast\->new(\-outfile => \*(Aqbl2seq.out\*(Aq); \& $factory\->bl2seq($input, $input2); \& \& # Experimental support for WU\-Blast 2.0 \& my $factory = Bio::Tools::Run::StandAloneBlast\->new(\-program =>"wublastp", \& \-database =>"swissprot", \& \-e => 1e\-20); \& my $blast_report = $factory\->wublast($seq); \& \& # Experimental support for NCBI rpsblast \& my $factory = Bio::Tools::Run::StandAloneBlast\->new(\-db => \*(AqCDD/Cog\*(Aq, \& \-expect => 0.001); \& $factory\->F(\*(AqT\*(Aq); # turn on SEG filtering of query sequence \& my $blast_report = $factory\->rpsblast($seq); \& \& # Use the experimental fast Blast parser, \*(Aqblast_pull\*(Aq \& my $factory = Bio::Tools::Run::StandAloneBlast\->new(\-_READMETHOD =>\*(Aqblast_pull\*(Aq, \& @other_params); \& \& # Various additional options and input formats are available, \& # see the DESCRIPTION section for details. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This \s-1DESCRIPTION\s0 only documents Bio::Tools::Run::StandAloneBlast, a Bioperl object for running the \s-1NCBI\s0 standAlone \s-1BLAST\s0 package. Blast itself is a large & complex program \- for more information regarding \&\s-1BLAST,\s0 please see the \s-1BLAST\s0 documentation which accompanies the \s-1BLAST\s0 distribution. \s-1BLAST\s0 is available from ftp://ncbi.nlm.nih.gov/blast/. .PP A source of confusion in documenting a \s-1BLAST\s0 interface is that the term \*(L"program\*(R" is used in \- at least \- three different ways in the \&\s-1BLAST\s0 documentation. In this \s-1DESCRIPTION,\s0 \*(L"program\*(R" will refer to the \&\s-1BLAST\s0 routine set by the \s-1BLAST\s0 \f(CW\*(C`\-p\*(C'\fR parameter that can be set to blastn, blastp, tblastx etc. We will use the term Blast \*(L"executable\*(R" to refer to the various different executable files that may be called \- ie. blastall, blastpgp or bl2seq. In addition, there are several \s-1BLAST\s0 capabilities, which are also referred to as \*(L"programs\*(R", and are implemented by using specific combinations of \s-1BLAST\s0 executables, programs and parameters. They will be referred by their specific names \- eg \s-1PSIBLAST\s0 and \s-1PHIBLAST.\s0 .PP Before running StandAloneBlast it is necessary: to install \s-1BLAST\s0 on your system, to edit set the environmental variable \f(CW$BLASTDIR\fR or your \f(CW$PATH\fR variable to point to the \s-1BLAST\s0 directory, and to ensure that users have execute privileges for the \s-1BLAST\s0 program. .PP If the databases which will be searched by \s-1BLAST\s0 are located in the data subdirectory of the blast program directory (the default installation location), StandAloneBlast will find them; however, if the database files are located in any other location, environmental variable \f(CW$BLASTDATADIR\fR will need to be set to point to that directory. .PP The use of the StandAloneBlast module is as follows: Initially, a local blast \*(L"factory object\*(R" is created. The constructor may be passed an optional array of (non-default) parameters to be used by the factory, eg: .PP .Vb 2 \& @params = (\-program => \*(Aqblastn\*(Aq, \-database => \*(Aqecoli.nt\*(Aq); \& $factory = Bio::Tools::Run::StandAloneBlast\->new(@params); .Ve .PP Any parameters not explicitly set will remain as the defaults of the \&\s-1BLAST\s0 executable. Note each \s-1BLAST\s0 executable has somewhat different parameters and options. See the \s-1BLAST\s0 Documentation for a description or run the \s-1BLAST\s0 executable from the command line followed solely with a \*(L"\-\*(R" to see a list of options and default values for that executable; eg >blastall \-. .PP \&\s-1BLAST\s0 parameters can be changed and/or examined at any time after the factory has been created. The program checks that any parameter/switch being set/read is valid. Except where specifically noted, StandAloneBlast uses the same single-letter, case-sensitive parameter names as the actual blast program. Currently no checks are included to verify that parameters are of the proper type (e.g. string or numeric) or that their values are within the proper range. .PP As an example, to change the value of the Blast parameter 'e' ('e' is the parameter for expectation-value cutoff) .PP .Vb 2 \& $expectvalue = 0.01; \& $factory\->e($expectvalue); .Ve .PP Note that for improved script readibility one can modify the name of the (ncbi) \s-1BLAST\s0 parameters as desired as long as the initial letter (and case) of the parameter are preserved, e.g.: .PP .Vb 1 \& $factory\->expectvalue($expectvalue); .Ve .PP Unfortunately, some of the \s-1BLAST\s0 parameters are not the single letter one might expect (eg \*(L"iteration round\*(R" in blastpgp is 'j'). Again one can check by using, for example: .PP .Vb 1 \& > blastpgp \- .Ve .PP Wublast parameters need to be complete (ie. don't truncate them to their first letter), but are case-insensitive. .PP Once the factory has been created and the appropriate parameters set, one can call one of the supported blast executables. The input sequence(s) to these executables may be fasta file(s) as described in the \s-1BLAST\s0 documentation. .PP .Vb 2 \& $inputfilename = \*(Aqt/testquery.fa\*(Aq; \& $blast_report = $factory\->blastall($inputfilename); .Ve .PP In addition, sequence input may be in the form of either a Bio::Seq object or (a reference to) an array of Bio::Seq objects, e.g.: .PP .Vb 3 \& $input = Bio::Seq\->new(\-id => "test query", \& \-seq => "ACTACCCTTTAAATCAGTGGGGG"); \& $blast_report = $factory\->blastall($input); .Ve .PP \&\s-1NOTE:\s0 Use of the BPlite method has been deprecated and is no longer supported. .PP For blastall and non-psiblast blastpgp runs, report object is a Bio::SearchIO object, selected by the user with the parameter _READMETHOD. The leading underscore is needed to distinguish this option from options which are passed to the \s-1BLAST\s0 executable. The default parser is Bio::SearchIO::blast. In any case, the \*(L"raw\*(R" blast report is also available. The filename is set by the 'outfile' parameter and has the default value of \*(L"blastreport.out\*(R". .PP For psiblast execution in the \s-1BLAST\s0 \*(L"jumpstart\*(R" mode, the program must be passed (in addition to the query sequence itself) an alignment containing the query sequence (in the form of a SimpleAlign object) as well as a \*(L"mask\*(R" specifying at what residues position-specific scoring matrices (PSSMs) are to used and at what residues default scoring matrices (eg \s-1BLOSUM\s0) are to be used. See psiblast documentation for more details. The mask itself is a string of 0's and 1's which is the same length as each sequence in the alignment and has a \*(L"1\*(R" at locations where (PSSMs) are to be used and a \*(L"0\*(R" at all other locations. So for example: .PP .Vb 7 \& $str = Bio::AlignIO\->new(\-file => "cysprot.msf", \& \-format => \*(Aqmsf\*(Aq); \& $aln = $str\->next_aln(); \& $len = $aln\->length_aln(); \& $mask = \*(Aq1\*(Aq x $len; \& # simple case where PSSM\*(Aqs to be used at all residues \& $report = $factory\->blastpgp("cysprot1.fa", $aln, $mask); .Ve .PP For bl2seq execution, StandAloneBlast.pm can be combined with AlignIO.pm to directly produce a SimpleAlign object from the alignment of the two sequences produced by bl2seq as in: .PP .Vb 4 \& # Get 2 sequences \& $str = Bio::SeqIO\->new(\-file=>\*(Aqt/amino.fa\*(Aq , \-format => \*(AqFasta\*(Aq); \& my $seq3 = $str\->next_seq(); \& my $seq4 = $str\->next_seq(); \& \& # Run bl2seq on them \& $factory = Bio::Tools::Run::StandAloneBlast\->new(\-program => \*(Aqblastp\*(Aq, \& \-outfile => \*(Aqbl2seq.out\*(Aq); \& my $bl2seq_report = $factory\->bl2seq($seq3, $seq4); \& \& # Use AlignIO.pm to create a SimpleAlign object from the bl2seq report \& $str = Bio::AlignIO\->new(\-file=> \*(Aqbl2seq.out\*(Aq,\-format => \*(Aqbl2seq\*(Aq); \& $aln = $str\->next_aln(); .Ve .PP For more examples of syntax and use of StandAloneBlast.pm, the user is encouraged to run the scripts standaloneblast.pl in the bioperl examples/tools directory and StandAloneBlast.t in the bioperl t/ directory. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Peter Schattner" .IX Header "AUTHOR - Peter Schattner" Email schattner at alum.mit.edu .SH "MAINTAINER \- Torsten Seemann" .IX Header "MAINTAINER - Torsten Seemann" Email torsten at infotech.monash.edu.au .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Sendu Bala bix@sendu.me.uk (reimplementation) .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 7 \& Title : new \& Usage : my $obj = Bio::Tools::Run::StandAloneBlast\->new(); \& Function: Builds a newBio::Tools::Run::StandAloneBlast object \& Returns : Bio::Tools::Run::StandAloneNCBIBlast or StandAloneWUBlast \& Args : \-quiet => boolean # make program execution quiet \& \-_READMETHOD => \*(AqBLAST\*(Aq (default, synonym \*(AqSearchIO\*(Aq) || \*(Aqblast_pull\*(Aq \& # the parsing method, case insensitive .Ve .PP Essentially all \s-1BLAST\s0 parameters can be set via StandAloneBlast.pm. Some of the most commonly used parameters are listed below. All parameters have defaults and are optional except for \-p in those programs that have it. For a complete listing of settable parameters, run the relevant executable \s-1BLAST\s0 program with the option \*(L"\-\*(R" as in blastall \- Note that the input parameters (\-i, \-j, \-input) should not be set directly by you: this module sets them when you call one of the executable methods. .PP Blastall .PP .Vb 12 \& \-p Program Name [String] \& Input should be one of "blastp", "blastn", "blastx", \& "tblastn", or "tblastx". \& \-d Database [String] default = nr \& The database specified must first be formatted with formatdb. \& Multiple database names (bracketed by quotations) will be accepted. \& An example would be \-d "nr est" \& \-e Expectation value (E) [Real] default = 10.0 \& \-o BLAST report Output File [File Out] Optional, \& default = ./blastreport.out ; set by StandAloneBlast.pm \& \-S Query strands to search against database (for blast[nx], and tblastx). 3 is both, 1 is top, 2 is bottom [Integer] \& default = 3 .Ve .PP Blastpgp (including Psiblast) .PP .Vb 6 \& \-j is the maximum number of rounds (default 1; i.e., regular BLAST) \& \-h is the e\-value threshold for including sequences in the \& score matrix model (default 0.001) \& \-c is the "constant" used in the pseudocount formula specified in the paper (default 10) \& \-B Multiple alignment file for PSI\-BLAST "jump start mode" Optional \& \-Q Output File for PSI\-BLAST Matrix in ASCII [File Out] Optional .Ve .PP rpsblast .PP .Vb 7 \& \-d Database [String] default = (none \- you must specify a database) \& The database specified must first be formatted with formatdb. \& Multiple database names (bracketed by quotations) will be accepted. \& An example would be \-d "Cog Smart" \& \-e Expectation value (E) [Real] default = 10.0 \& \-o BLAST report Output File [File Out] Optional, \& default = ./blastreport.out ; set by StandAloneBlast.pm .Ve .PP Bl2seq .PP .Vb 6 \& \-p Program name: blastp, blastn, blastx. For blastx 1st argument should be nucleotide [String] \& default = blastp \& \-o alignment output file [File Out] default = stdout \& \-e Expectation value (E) [Real] default = 10.0 \& \-S Query strands to search against database (blastn only). 3 is both, 1 is top, 2 is bottom [Integer] \& default = 3 .Ve .PP WU-Blast .PP .Vb 8 \& \-p Program Name [String] \& Input should be one of "wublastp", "wublastn", "wublastx", \& "wutblastn", or "wutblastx". \& \-d Database [String] default = nr \& The database specified must first be formatted with xdformat. \& \-E Expectation value (E) [Real] default = 10.0 \& \-o BLAST report Output File [File Out] Optional, \& default = ./blastreport.out ; set by StandAloneBlast.pm .Ve .SS "executable" .IX Subsection "executable" .Vb 6 \& Title : executable \& Usage : my $exe = $blastfactory\->executable(\*(Aqblastall\*(Aq); \& Function: Finds the full path to the executable \& Returns : string representing the full path to the exe \& Args : [optional] name of executable to set path to \& [optional] boolean flag whether or not warn when exe is not found .Ve .SS "program_dir" .IX Subsection "program_dir" .Vb 5 \& Title : program_dir \& Usage : my $dir = $factory\->program_dir(); \& Function: Abstract get method for dir of program. \& Returns : string representing program directory \& Args : none .Ve .SS "_setinput" .IX Subsection "_setinput" .Vb 6 \& Title : _setinput \& Usage : Internal function, not to be called directly \& Function: Create input file(s) for Blast executable \& Example : \& Returns : name of file containing Blast data input \& Args : Seq object reference or input file name .Ve .SH "Bio::Tools::Run::WrapperBase methods" .IX Header "Bio::Tools::Run::WrapperBase methods" .SS "no_param_checks" .IX Subsection "no_param_checks" .Vb 6 \& Title : no_param_checks \& Usage : $obj\->no_param_checks($newval) \& Function: Boolean flag as to whether or not we should \& trust the sanity checks for parameter values \& Returns : value of no_param_checks \& Args : newvalue (optional) .Ve .SS "save_tempfiles" .IX Subsection "save_tempfiles" .Vb 5 \& Title : save_tempfiles \& Usage : $obj\->save_tempfiles($newval) \& Function: \& Returns : value of save_tempfiles \& Args : newvalue (optional) .Ve .SS "outfile_name" .IX Subsection "outfile_name" .Vb 6 \& Title : outfile_name \& Usage : my $outfile = $tcoffee\->outfile_name(); \& Function: Get/Set the name of the output file for this run \& (if you wanted to do something special) \& Returns : string \& Args : [optional] string to set value to .Ve .SS "tempdir" .IX Subsection "tempdir" .Vb 5 \& Title : tempdir \& Usage : my $tmpdir = $self\->tempdir(); \& Function: Retrieve a temporary directory name (which is created) \& Returns : string which is the name of the temporary directory \& Args : none .Ve .SS "cleanup" .IX Subsection "cleanup" .Vb 5 \& Title : cleanup \& Usage : $tcoffee\->cleanup(); \& Function: Will cleanup the tempdir directory after a PAML run \& Returns : none \& Args : none .Ve .SS "io" .IX Subsection "io" .Vb 5 \& Title : io \& Usage : $obj\->io($newval) \& Function: Gets a Bio::Root::IO object \& Returns : Bio::Root::IO \& Args : none .Ve