Bio-Tools-Run-Alignment-Clustalw
view release on metacpan or search on metacpan
lib/Bio/Tools/Run/Alignment/Clustalw.pm view on Meta::CPAN
$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(\@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 \n"
} else {
print " All sequences match $regex : @seqs_not_matched \n"
}
print "Consensus sequence of local alignment: $consensus \n";
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 <str> : File containing input sequences in fasta format (default = $infile) .
-do <str> : String listing examples to be executed. Default is to execute
all tests (ie default = '123')
-param <str> : Parameter to be varied in example 1. Any clustalw parameter
which takes inteer values can be varied (default = 'ktuple')
-start <int> : Initial value for varying parameter in example 1 (default = 1)
-stop <int> : Final value for varying parameter (default = 3)
-regex <str> : Regular expression for 'anchoring' alignment in example 3
(default = $regex)
-ext <int> : 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='W[AST]F' -do=23 -in='t/cysprot1a.fa'
QQ_PARAMS_QQ
}
=head1 PARAMETER FOR ALIGNMENT COMPUTATION
=head2 KTUPLE
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
=head2 TOPDIAGS
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.
=head2 WINDOW
Title : WINDOW
Description : (optional) window size
This is the number of diagonals around each of the 'best'
diagonals that will be used. Decrease for speed;
increase for sensitivity.
=head2 PAIRGAP
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.
=head2 FIXEDGAP
Title : FIXEDGAP
Description : (optional) fixed length gap penalty
=head2 FLOATGAP
Title : FLOATGAP
Description : (optional) variable length gap penalty
=head2 MATRIX
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
( run in 3.011 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )