.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 .\" ======================================================================== .\" .IX Title "Bio::Tools::Run::Alignment::Clustalw 3pm" .TH Bio::Tools::Run::Alignment::Clustalw 3pm "2022-05-28" "perl v5.34.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::Alignment::Clustalw \- Object for the calculation of a multiple sequence alignment from a set of unaligned sequences or alignments using the Clustalw program .SH "VERSION" .IX Header "VERSION" version 1.7.4 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # Build a clustalw alignment factory \& @params = (\*(Aqktuple\*(Aq => 2, \*(Aqmatrix\*(Aq => \*(AqBLOSUM\*(Aq); \& $factory = Bio::Tools::Run::Alignment::Clustalw\->new(@params); \& \& # Pass the factory a list of sequences to be aligned. \& $inputfilename = \*(Aqt/data/cysprot.fa\*(Aq; \& $aln = $factory\->align($inputfilename); # $aln is a SimpleAlign object. \& # or \& $seq_array_ref = \e@seq_array; \& # where @seq_array is an array of Bio::Seq objects \& $aln = $factory\->align($seq_array_ref); \& \& # Or one can pass the factory a pair of (sub)alignments \& #to be aligned against each other, e.g.: \& $aln = $factory\->profile_align($aln1,$aln2); \& # where $aln1 and $aln2 are Bio::SimpleAlign objects. \& \& # Or one can pass the factory an alignment and one or more unaligned \& # sequences to be added to the alignment. For example: \& $aln = $factory\->profile_align($aln1,$seq); # $seq is a Bio::Seq object. \& \& # Get a tree of the sequences \& $tree = $factory\->tree(\e@seq_array); \& \& # Get both an alignment and a tree \& ($aln, $tree) = $factory\->run(\e@seq_array); \& \& # Do a footprinting analysis on the supplied sequences, getting back the \& # most conserved sub\-alignments \& my @results = $factory\->footprint(\e@seq_array); \& foreach my $result (@results) { \& print $result\->consensus_string, "\en"; \& } \& \& # There are various additional options and input formats available. \& # See the DESCRIPTION section that follows for additional details. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Note: this \s-1DESCRIPTION\s0 only documents the Bioperl interface to Clustalw. Clustalw, itself, is a large & complex program \- for more information regarding clustalw, please see the clustalw documentation which accompanies the clustalw distribution. Clustalw is available from (among others) ftp://ftp.ebi.ac.uk/pub/software/. Clustalw.pm has only been tested using version 1.8 of clustalw. Compatibility with earlier versions of the clustalw program is currently unknown. Before running Clustalw successfully it will be necessary: to install clustalw on your system, and to ensure that users have execute privileges for the clustalw program. .SS "Helping the module find your executable" .IX Subsection "Helping the module find your executable" You will need to enable Clustalw to find the clustalw program. This can be done in (at least) three ways: .PP .Vb 3 \& 1. Make sure the clustalw executable is in your path so that \& which clustalw \& returns a clustalw executable on your system. \& \& 2. Define an environmental variable CLUSTALDIR which is a \& directory which contains the \*(Aqclustalw\*(Aq application: \& In bash: \& \& export CLUSTALDIR=/home/username/clustalw1.8 \& \& In csh/tcsh: \& \& setenv CLUSTALDIR /home/username/clustalw1.8 \& \& 3. Include a definition of an environmental variable CLUSTALDIR in \& every script that will use this Clustalw wrapper module, e.g.: \& \& BEGIN { $ENV{CLUSTALDIR} = \*(Aq/home/username/clustalw1.8/\*(Aq } \& use Bio::Tools::Run::Alignment::Clustalw; .Ve .PP If you are running an application on a webserver make sure the webserver environment has the proper \s-1PATH\s0 set or use the options 2 or 3 to set the variables. .SS "How it works" .IX Subsection "How it works" Bio::Tools::Run::Alignment::Clustalw is an object for performing a multiple sequence alignment from a set of unaligned sequences and/or sub-alignments by means of the clustalw program. .PP Initially, a clustalw \*(L"factory object\*(R" is created. Optionally, the factory may be passed most of the parameters or switches of the clustalw program, e.g.: .PP .Vb 2 \& @params = (\*(Aqktuple\*(Aq => 2, \*(Aqmatrix\*(Aq => \*(AqBLOSUM\*(Aq); \& $factory = Bio::Tools::Run::Alignment::Clustalw\->new(@params); .Ve .PP Any parameters not explicitly set will remain as the defaults of the clustalw program. Additional parameters and switches (not available in clustalw) may also be set. Currently, the only such parameter is \&\*(L"quiet\*(R", which when set to a non-zero value, suppresses clustalw terminal output. Not all clustalw parameters are supported at this stage. .PP By default, Clustalw output is returned solely in a the form of a Bio::SimpleAlign object which can then be printed and/or saved in multiple formats using the AlignIO.pm module. Optionally the raw clustalw output file can be saved if the calling script specifies an output file (with the clustalw parameter \s-1OUTFILE\s0). Currently only the GCG-MSF output file formats is supported. .PP Not all parameters and features have been implemented yet in Perl format. .PP Alignment 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. However, currently no additional checks are included to check that parameters are of the proper type (eg string or numeric) or that their values are within the proper range. As an example, to change the value of the clustalw parameter ktuple to 3 and subsequently to check its value one would write: .PP .Vb 3 \& $ktuple = 3; \& $factory\->ktuple($ktuple); \& $get_ktuple = $factory\->ktuple(); .Ve .PP Once the factory has been created and the appropriate parameters set, one can call the method \fBalign()\fR to align a set of unaligned sequences, or call \fBprofile_align()\fR to add one or more sequences or a second alignment to an initial alignment. .PP Input to \fBalign()\fR may consist of a set of unaligned sequences in the form of the name of file containing the sequences. For example, .PP .Vb 2 \& $inputfilename = \*(Aqt/data/cysprot.fa\*(Aq; \& $aln = $factory\-Ealign($inputfilename); .Ve .PP Alternately one can create an array of Bio::Seq objects somehow .PP .Vb 3 \& $str = Bio::SeqIO\->new(\-file=> \*(Aqt/data/cysprot.fa\*(Aq, \-format => \*(AqFasta\*(Aq); \& @seq_array =(); \& while ( my $seq = $str\->next_seq() ) {push (@seq_array, $seq) ;} .Ve .PP and pass the factory a reference to that array .PP .Vb 2 \& $seq_array_ref = \e@seq_array; \& $aln = $factory\->align($seq_array_ref); .Ve .PP In either case, \fBalign()\fR returns a reference to a SimpleAlign object which can then used (see Bio::SimpleAlign). .PP Once an initial alignment exists, one can pass the factory additional sequence(s) to be added (ie aligned) to the original alignment. The alignment can be passed as either an alignment file or a Bio:SimpleAlign object. The unaligned sequence(s) can be passed as a filename or as an array of BioPerl sequence objects or as a single BioPerl Seq object. For example (to add a single sequence to an alignment), .PP .Vb 5 \& $str = Bio::AlignIO\->new(\-file=> \*(Aqt/data/cysprot1a.msf\*(Aq); \& $aln = $str\->next_aln(); \& $str1 = Bio::SeqIO\->new(\-file=> \*(Aqt/data/cysprot1b.fa\*(Aq); \& $seq = $str1\->next_seq(); \& $aln = $factory\->profile_align($aln,$seq); .Ve .PP In either case, \fBprofile_align()\fR returns a reference to a SimpleAlign object containing a new SimpleAlign object of the alignment with the additional sequence(s) added in. .PP Finally one can pass the factory a pair of (sub)alignments to be aligned against each other. The alignments can be passed in the form of either a pair of alignment files or a pair of Bio:SimpleAlign objects. For example, .PP .Vb 3 \& $profile1 = \*(Aqt/data/cysprot1a.msf\*(Aq; \& $profile2 = \*(Aqt/data/cysprot1b.msf\*(Aq; \& $aln = $factory\->profile_align($profile1,$profile2); .Ve .PP or .PP .Vb 5 \& $str1 = Bio::AlignIO\->new(\-file=> \*(Aqt/data/cysprot1a.msf\*(Aq); \& $aln1 = $str1\->next_aln(); \& $str2 = Bio::AlignIO\->new(\-file=> \*(Aqt/data/cysprot1b.msf\*(Aq); \& $aln2 = $str2\->next_aln(); \& $aln = $factory\->profile_align($aln1,$aln2); .Ve .PP In either case, \fBprofile_align()\fR returns a reference to a SimpleAlign object containing an (super)alignment of the two input alignments. .PP For more examples of syntax and use of Clustalw, the user is encouraged to look at the script Clustalw.t in the t/ directory. .PP Note: Clustalw is still under development. Various features of the clustalw program have not yet been implemented. If you would like that a specific clustalw feature be added to this perl contact bioperl\-l@bioperl.org. .PP These can be specified as parameters when instantiating a new Clustalw object, or through get/set methods of the same name (lowercase). .SH "INTERNAL METHODS" .IX Header "INTERNAL METHODS" .SS "_run" .IX Subsection "_run" .Vb 7 \& Title : _run \& Usage : Internal function, not to be called directly \& Function: makes actual system call to clustalw program \& Returns : nothing; clustalw output is written to a \& temporary file \& Args : Name of a file containing a set of unaligned fasta sequences \& and hash of parameters to be passed to clustalw .Ve .SS "\fB_setinput()\fP" .IX Subsection "_setinput()" .Vb 5 \& Title : _setinput \& Usage : Internal function, not to be called directly \& Function: Create input file for clustalw program \& Returns : name of file containing clustalw data input \& Args : Seq or Align object reference or input file name .Ve .SS "\fB_setparams()\fP" .IX Subsection "_setparams()" .Vb 6 \& Title : _setparams \& Usage : Internal function, not to be called directly \& Function: Create parameter inputs for clustalw program \& Returns : parameter string to be passed to clustalw \& during align or profile_align \& Args : name of calling object .Ve .SH "EXAMPLE" .IX Header "EXAMPLE" You will need to have installed clustalw and to ensure that Clustalw.pm can find it. This can be done in different ways (bash syntax): .PP .Vb 1 \& export PATH=$PATH:/home/peter/clustalw1.8 .Ve .PP or define an environmental variable \s-1CLUSTALDIR:\s0 .PP .Vb 1 \& export CLUSTALDIR=/home/peter/clustalw1.8 .Ve .PP or include a definition of an environmental variable \s-1CLUSTALDIR\s0 in every script that will use Clustal.pm: .PP .Vb 1 \& BEGIN {$ENV{CLUSTALDIR} = \*(Aq/home/peter/clustalw1.8/\*(Aq; } .Ve .PP We are going to demonstrate 3 possible applications of Clustalw.pm: .IP "1." 4 Test effect of varying clustalw alignment parameter(s) on resulting alignment .IP "2." 4 Test effect of changing the order that sequences are added to the alignment on the resulting alignment .IP "3." 4 Test effect of incorporating an \*(L"anchor point\*(R" in the alignment process .PP Before we can do any tests, we need to set up the environment, create the factory and read in the unaligned sequences. .PP .Vb 6 \& use Getopt::Long; \& use Bio::Tools::Run::Alignment::Clustalw; \& use Bio::SimpleAlign; \& use Bio::AlignIO; \& use Bio::SeqIO; \& use strict; \& \& # set some default values \& my $infile = \*(Aqt/data/cysprot1a.fa\*(Aq; \& my @params = (\*(Aqquiet\*(Aq => 1 ); \& my $do_only = \*(Aq123\*(Aq; # string listing examples to be executed. Default is to \& # execute all tests (ie 1,2 and 3) \& my $param = \*(Aqktuple\*(Aq; # parameter to be varied in example 1 \& my $startvalue = 1; # initial value for parameter $param \& my $stopvalue = 3; # final value for parameter $param \& my $regex = \*(AqW[AT]F\*(Aq; # regular expression for \*(Aqanchoring\*(Aq alignment in example 3 \& my $extension = 30; # distance regexp anchor should be extended in each direction \& # for local alignment in example 3 \& my $helpflag = 0; # Flag to show usage info. \& \& # get user options \& my @argv = @ARGV; # copy ARGV before GetOptions() massacres it. \& \& &GetOptions("h!" => \e$helpflag, "help!" => \e$helpflag, \& "in=s" => \e$infile, \& "param=s" => \e$param, \& "do=s" => \e$do_only, \& "start=i" => \e$startvalue, \& "stop=i" => \e$stopvalue, \& "ext=i" => \e$extension, \& "regex=s" => \e$regex,) ; \& \& if ($helpflag) { &clustalw_usage(); exit 0;} \& \& # create factory & set user\-specified global clustalw parameters \& foreach my $argv (@argv) { \& unless ($argv =~ /^(.*)=>(.*)$/) { next;} \& push (@params, $1 => $2); \& } \& my $factory = Bio::Tools::Run::Alignment::Clustalw\->new(@params); \& \& \& # put unaligned sequences in a Bio::Seq array \& my $str = Bio::SeqIO\->new(\-file=> $infile, \*(Aq\-format\*(Aq => \*(AqFasta\*(Aq); \& my ($paramvalue, $aln, $subaln, @consensus, $seq_num, $string, $strout, $id); \& my @seq_array =(); \& while ( my $seq = $str\->next_seq() ) { push (@seq_array, $seq) ;} \& \& # Do each example that has digit present in variable $do_only \& $_= $do_only; \& /1/ && &vary_params(); \& /2/ && &vary_align_order(); \& /3/ && &anchored_align(); \& \& ## End of "main" \& \& ################################################# \& # vary_params(): Example demonstrating varying of clustalw parameter \& # \& \& sub vary_params { \& \& print "Beginning parameter\-varying example... \en"; \& \& # Now we\*(Aqll create several alignments, 1 for each value of the selected \& # parameter. We also compute a simple consensus string for each alignment. \& # (In the default case, we vary the "ktuple" parameter, creating 3 \& # alignments using ktuple values from 1 to 3.) \& \& my $index =0; \& for ($paramvalue = $startvalue; $paramvalue < ($stopvalue + 1); $paramvalue++) { \& $factory\->$param($paramvalue); # set parameter value \& print "Performing alignment with $param = $paramvalue \en"; \& $aln = $factory\->align(\e@seq_array); \& $string = $aln\->consensus_string(); # Get consensus of alignment \& # convert \*(Aq?\*(Aq to \*(AqX\*(Aq at non\-consensus positions \& $string =~ s/\e?/X/g; \& $consensus[$index] = Bio::Seq\->new(\-id=>"$param=$paramvalue",\-seq=>$string); \& $index++; \& } \& # Compare consensus strings for alignments with different $param values by \& # making an alignment of the different consensus strings \& # $factory\->ktuple(1); # set ktuple parameter \& print "Performing alignment of $param consensus sequences \en"; \& $aln = $factory\->align(\e@consensus); \& $strout = Bio::AlignIO\->newFh(\*(Aq\-format\*(Aq => \*(Aqmsf\*(Aq); \& print $strout $aln; \& \& return 1; \& } \& \& \& ################################################# \& # vary_align_order(): \& # \& # For our second example, we\*(Aqll test the effect of changing the order \& # that sequences are added to the alignment \& \& sub vary_align_order { \& \& print "\enBeginning alignment\-order\-changing example... \en"; \& \& @consensus = (); # clear array \& for ($seq_num = 0; $seq_num < scalar(@seq_array); $seq_num++) { \& my $obj_out = shift @seq_array; # remove one Seq object from array and save \& $id = $obj_out\->display_id; \& # align remaining sequences \& print "Performing alignment with sequence $id left out \en"; \& $subaln = $factory\->align(\e@seq_array); \& # add left\-out sequence to subalignment \& $aln = $factory\->profile_align($subaln,$obj_out); \& $string = $aln\->consensus_string(); # Get consensus of alignment \& # convert \*(Aq?\*(Aq to \*(AqX\*(Aq for non\-consensus positions \& $string =~ s/\e?/X/g; \& $consensus[$seq_num] = Bio::Seq\->new(\-id=>"$id left out",\-seq=>$string); \& push @seq_array, $obj_out; # return Seq object for next (sub) alignment \& } \& \& # Compare consensus strings for alignments created in different orders \& # $factory\->ktuple(1); # set ktuple parameter \& print "\enPerforming alignment of consensus sequences for different reorderings \en"; \& print "Each consensus is labeled by the sequence which was omitted in the initial alignment\en"; \& $aln = $factory\->align(\e@consensus); \& $strout = Bio::AlignIO\->newFh(\*(Aq\-format\*(Aq => \*(Aqmsf\*(Aq); \& print $strout $aln; \& \& return 1; \& } \& \& ################################################# \& # anchored_align() \& # \& # For our last example, we\*(Aqll test a way to perform a local alignment by \& # "anchoring" the alignment to a regular expression. This is similar \& # to the approach taken in the recent dbclustal program. \& # In principle, we could write a script to search for a good regular expression \& # to use. Instead, here we\*(Aqll simply choose one manually after looking at the \& # previous alignments. \& \& sub anchored_align { \& \& my @local_array = (); \& my @seqs_not_matched = (); \& \& print "\en Beginning anchored\-alignment example... \en"; \& \& for ($seq_num = 0; $seq_num < scalar(@seq_array); $seq_num++) { \& my $seqobj = $seq_array[$seq_num]; \& my $seq = $seqobj\->seq(); \& my $id = $seqobj\->id(); \& # if $regex is not found in the sequence, save sequence id name and set \& # array value =0 for later \& unless ($seq =~/$regex/) { \& $local_array[$seq_num] = 0; \& push (@seqs_not_matched, $id) ; \& next; \& } \& # find positions of start and of subsequence to be aligned \& my $match_start_pos = length($\`); \& my $match_stop_pos = length($\`) + length($&); \& my $start = ($match_start_pos \- $extension) > 1 ? \& ($match_start_pos \- $extension) +1 : 1; \& my $stop = ($match_stop_pos + $extension) < length($seq) ? \& ($match_stop_pos + $extension) : length($seq); \& my $string = $seqobj\->subseq($start, $stop); \& \& $local_array[$seq_num] = Bio::Seq\->new(\-id=>$id, \-seq=>$string); \& } \& @local_array = grep $_ , @local_array; # remove array entries with no match \& \& # Perform alignment on the local segments of the sequences which match "anchor" \& $aln = $factory\->align(\e@local_array); \& my $consensus = $aln\->consensus_string(); # Get consensus of local alignment \& \& if (scalar(@seqs_not_matched) ) { \& print " Sequences not matching $regex : @seqs_not_matched \en" \& } else { \& print " All sequences match $regex : @seqs_not_matched \en" \& } \& print "Consensus sequence of local alignment: $consensus \en"; \& \& return 1; \& } \& \& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& sub clustalw_usage { \& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& \& #\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& # Prints usage information for general parameters. \& \& print STDERR <<"QQ_PARAMS_QQ"; \& \& Command\-line accessible script variables and commands: \& \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \& \-h : Display this usage info and exit. \& \-in : File containing input sequences in fasta format (default = $infile) . \& \-do : String listing examples to be executed. Default is to execute \& all tests (ie default = \*(Aq123\*(Aq) \& \-param : Parameter to be varied in example 1. Any clustalw parameter \& which takes inteer values can be varied (default = \*(Aqktuple\*(Aq) \& \-start : Initial value for varying parameter in example 1 (default = 1) \& \-stop : Final value for varying parameter (default = 3) \& \-regex : Regular expression for \*(Aqanchoring\*(Aq alignment in example 3 \& (default = $regex) \& \-ext : Distance regexp anchor should be extended in each direction \& for local alignment in example 3 (default = 30) \& \& In addition, any valid Clustalw parameter can be set using the syntax \& "parameter=>value" as in "ktuple=>3" \& \& So a typical command lines might be: \& > clustalw.pl \-param=pairgap \-start=2 \-stop=3 \-do=1 "ktuple=>3" \& or \& > clustalw.pl \-ext=10 \-regex=\*(AqW[AST]F\*(Aq \-do=23 \-in=\*(Aqt/cysprot1a.fa\*(Aq \& \& QQ_PARAMS_QQ \& \& } .Ve .SH "PARAMETER FOR ALIGNMENT COMPUTATION" .IX Header "PARAMETER FOR ALIGNMENT COMPUTATION" .SS "\s-1KTUPLE\s0" .IX Subsection "KTUPLE" .Vb 7 \& Title : KTUPLE \& Description : (optional) set the word size to be used in the alignment \& This is the size of exactly matching fragment that is used. \& INCREASE for speed (max= 2 for proteins; 4 for DNA), \& DECREASE for sensitivity. \& For longer sequences (e.g. >1000 residues) you may \& need to increase the default .Ve .SS "\s-1TOPDIAGS\s0" .IX Subsection "TOPDIAGS" .Vb 7 \& Title : TOPDIAGS \& Description : (optional) number of best diagonals to use \& The number of k\-tuple matches on each diagonal \& (in an imaginary dot\-matrix plot) is calculated. \& Only the best ones (with most matches) are used in \& the alignment. This parameter specifies how many. \& Decrease for speed; increase for sensitivity. .Ve .SS "\s-1WINDOW\s0" .IX Subsection "WINDOW" .Vb 5 \& Title : WINDOW \& Description : (optional) window size \& This is the number of diagonals around each of the \*(Aqbest\*(Aq \& diagonals that will be used. Decrease for speed; \& increase for sensitivity. .Ve .SS "\s-1PAIRGAP\s0" .IX Subsection "PAIRGAP" .Vb 5 \& Title : PAIRGAP \& Description : (optional) gap penalty for pairwise alignments \& This is a penalty for each gap in the fast alignments. \& It has little affect on the speed or sensitivity except \& for extreme values. .Ve .SS "\s-1FIXEDGAP\s0" .IX Subsection "FIXEDGAP" .Vb 2 \& Title : FIXEDGAP \& Description : (optional) fixed length gap penalty .Ve .SS "\s-1FLOATGAP\s0" .IX Subsection "FLOATGAP" .Vb 2 \& Title : FLOATGAP \& Description : (optional) variable length gap penalty .Ve .SS "\s-1MATRIX\s0" .IX Subsection "MATRIX" .Vb 5 \& Title : MATRIX \& Default : PAM100 for DNA \- PAM250 for protein alignment \& Description : (optional) substitution matrix used in the multiple \& alignments. Depends on the version of clustalw as to \& what default matrix will be used \& \& PROTEIN WEIGHT MATRIX leads to a new menu where you are \& offered a choice of weight matrices. The default for \& proteins in version 1.8 is the PAM series derived by \& Gonnet and colleagues. Note, a series is used! The \& actual matrix that is used depends on how similar the \& sequences to be aligned at this alignment step \& are. Different matrices work differently at each \& evolutionary distance. \& \& DNA WEIGHT MATRIX leads to a new menu where a single \& matrix (not a series) can be selected. The default is \& the matrix used by BESTFIT for comparison of nucleic \& acid sequences. .Ve .SS "\s-1TYPE\s0" .IX Subsection "TYPE" .Vb 6 \& Title : TYPE \& Description : (optional) sequence type: protein or DNA. This allows \& you to explicitly override the programs attempt at \& guessing the type of the sequence. It is only useful \& if you are using sequences with a VERY strange \& composition. .Ve .SS "\s-1OUTPUT\s0" .IX Subsection "OUTPUT" .Vb 4 \& Title : OUTPUT \& Description : (optional) clustalw supports GCG or PHYLIP or PIR or \& Clustal format. See the Bio::AlignIO modules for \& which formats are supported by bioperl. .Ve .SS "\s-1OUTFILE\s0" .IX Subsection "OUTFILE" .Vb 4 \& Title : OUTFILE \& Description : (optional) Name of clustalw output file. If not set \& module will erase output file. In any case alignment will \& be returned in the form of SimpleAlign objects .Ve .SS "\s-1TRANSMIT\s0" .IX Subsection "TRANSMIT" .Vb 5 \& Title : TRANSMIT \& Description : (optional) transitions not weighted. The default is to \& weight transitions as more favourable than other \& mismatches in DNA alignments. This switch makes all \& nucleotide mismatches equally weighted. .Ve .SS "program_name" .IX Subsection "program_name" .Vb 5 \& Title : program_name \& Usage : $factory>program_name() \& Function: holds the program name \& Returns: string \& Args : None .Ve .SS "program_dir" .IX Subsection "program_dir" .Vb 5 \& Title : program_dir \& Usage : $factory\->program_dir(@params) \& Function: returns the program directory, obtained from ENV variable. \& Returns: string \& Args : .Ve .SS "version" .IX Subsection "version" .Vb 6 \& Title : version \& Usage : exit if $prog\->version() < 1.8 \& Function: Determine the version number of the program \& Example : \& Returns : float or undef \& Args : none .Ve .SS "run" .IX Subsection "run" .Vb 9 \& Title : run \& Usage : ($aln, $tree) = $factory\->run($inputfilename); \& ($aln, $tree) = $factory\->run($seq_array_ref); \& Function: Perform a multiple sequence alignment, generating a tree at the same \& time. (Like align() and tree() combined.) \& Returns : A SimpleAlign object containing the sequence alignment and a \& Bio::Tree::Tree object with the tree relating the sequences. \& Args : Name of a file containing a set of unaligned fasta sequences \& or else an array of references to Bio::Seq objects. .Ve .SS "align" .IX Subsection "align" .Vb 11 \& Title : align \& Usage : $inputfilename = \*(Aqt/data/cysprot.fa\*(Aq; \& $aln = $factory\->align($inputfilename); \& or \& $seq_array_ref = \e@seq_array; # @seq_array is array of Seq objs \& $aln = $factory\->align($seq_array_ref); \& Function: Perform a multiple sequence alignment \& Returns : Reference to a SimpleAlign object containing the \& sequence alignment. \& Args : Name of a file containing a set of unaligned fasta sequences \& or else an array of references to Bio::Seq objects. \& \& Throws an exception if argument is not either a string (eg a \& filename) or a reference to an array of Bio::Seq objects. If \& argument is string, throws exception if file corresponding to string \& name can not be found. If argument is Bio::Seq array, throws \& exception if less than two sequence objects are in array. .Ve .SS "profile_align" .IX Subsection "profile_align" .Vb 8 \& Title : profile_align \& Usage : $aln = $factory\->profile_align(@simple_aligns); \& or \& $aln = $factory\->profile_align(@subalignment_filenames); \& Function: Perform an alignment of 2 (sub)alignments \& Returns : Reference to a SimpleAlign object containing the (super)alignment. \& Args : Names of 2 files containing the subalignments \& or references to 2 Bio::SimpleAlign objects. .Ve .PP Throws an exception if arguments are not either strings (eg filenames) or references to SimpleAlign objects. .SS "add_sequences" .IX Subsection "add_sequences" .Vb 7 \& Title : add_sequences \& Usage : \& Function: Align and add sequences into an alignment \& Example : \& Returns : Reference to a SimpleAlign object containing the (super)alignment. \& Args : Names of 2 files, the first one containing an alignment and the second one containing sequences to be added \& or references to 2 Bio::SimpleAlign objects. .Ve .PP Throws an exception if arguments are not either strings (eg filenames) or references to SimpleAlign objects. .SS "tree" .IX Subsection "tree" .Vb 10 \& Title : tree \& Usage : @params = (\*(Aqbootstrap\*(Aq => 1000, \& \*(Aqtossgaps\*(Aq => 1, \& \*(Aqkimura\*(Aq => 1, \& \*(Aqseed\*(Aq => 121, \& \*(Aqbootlabels\*(Aq=> \*(Aqnodes\*(Aq, \& \*(Aqquiet\*(Aq => 1); \& $factory = Bio::Tools::Run::Alignment::Clustalw\->new(@params); \& $tree_obj = $factory\->tree($aln_obj); \& or \& $tree_obj = $factory\->tree($treefilename); \& Function: Retrieve a tree corresponding to the input \& Returns : Bio::TreeIO object \& Args : Bio::SimpleAlign or filename of a tree .Ve .SS "footprint" .IX Subsection "footprint" .Vb 11 \& Title : footprint \& Usage : @alns = $factory\->footprint($treefilename, $window_size, $diff); \& @alns = $factory\->footprint($seqs_array_ref); \& Function: Aligns all the supplied sequences and slices out of the alignment \& those regions along a sliding window who\*(Aqs tree length differs \& significantly from the total average tree length. \& Returns : list of Bio::SimpleAlign objects \& Args : first argument as per run(), optional second argument to specify \& the size of the sliding window (default 5 bp) and optional third \& argument to specify the % difference from the total tree length \& needed for a window to be considered a footprint (default 33%). .Ve .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 the Bioperl mailing list. Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/Support.html \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: \&\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 of the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bio\-tools\-run\-alignment\-clustalw/issues .Ve .SH "AUTHORS" .IX Header "AUTHORS" Peter Schattner .PP Jason Stajich .PP Sendu Bala .SH "COPYRIGHT" .IX Header "COPYRIGHT" This software is copyright (c) by Peter Schattner . .PP This software is available under the same terms as the perl 5 programming language system itself.