Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

POD syntax fixes

svn path=/bioperl-run/branches/branch-07/; revision=12940
  • Loading branch information...
commit 346f7f27598dc94da8dbd8d15b58bcc7db4117f9 1 parent b6657d0
@heikkil heikkil authored
View
109 Bio/Tools/Run/Alignment/Clustalw.pm
@@ -11,28 +11,32 @@
=head1 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
+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
=head1 SYNOPSIS
-# Build a clustalw alignment factory
- @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
- $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
+ # Build a clustalw alignment factory
+ @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
+ $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
-# Pass the factory a list of sequences to be aligned.
- $inputfilename = 't/cysprot.fa';
- $aln = $factory->align($inputfilename); # $aln is a SimpleAlign object.
-or
- $seq_array_ref = \@seq_array; # where @seq_array is an array of Bio::Seq objects
- $aln = $factory->align($seq_array_ref);
+ # Pass the factory a list of sequences to be aligned.
+ $inputfilename = 't/cysprot.fa';
+ $aln = $factory->align($inputfilename); # $aln is a SimpleAlign object.
+ # or
+ $seq_array_ref = \@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 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.
+ # 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.
There are various additional options and input formats available. See
the DESCRIPTION section that follows for additional details.
@@ -106,7 +110,7 @@ alignment to an initial alignment.
Input to align() may consist of a set of unaligned sequences in the
form of the name of file containing the sequences. For example,
$inputfilename = 't/cysprot.fa'; $aln =
-$factory->align($inputfilename);
+$factory-E<gt>align($inputfilename);
Alternately one can create an array of Bio::Seq objects somehow
@@ -170,42 +174,42 @@ me know.
These can be specified as paramters when instantiating a new TCoffee
object, or through get/set methods of the same name (lowercase).
-=head2 PARAMETER FOR ALIGNMENT COMPUTATION
+=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
+ 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.
+ 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
+ Description : (optional) window size
This is the number of diagonals around each of the 'best'
- diagonals that will be used. Decrease for speed;
+ 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
+ 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
@@ -220,8 +224,8 @@ object, or through get/set methods of the same name (lowercase).
=head2 MATRIX
- Title : MATRIX
- Default : PAM100 for DNA - PAM250 for protein alignment
+ 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
@@ -301,13 +305,13 @@ The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _
=cut
-#'
+#'
package Bio::Tools::Run::Alignment::Clustalw;
use vars qw($AUTOLOAD @ISA $DEBUG $PROGRAM $PROGRAMDIR
- $TMPDIR $TMPOUTFILE @CLUSTALW_SWITCHES @CLUSTALW_PARAMS
+ $TMPDIR $TMPOUTFILE @CLUSTALW_SWITCHES @CLUSTALW_PARAMS
@OTHER_SWITCHES %OK_FIELD);
use strict;
use Bio::Seq;
@@ -322,17 +326,17 @@ use Bio::Root::IO;
BEGIN {
# You will need to enable Clustalw to find the clustalw program. This
-# can be done in (at least) three ways:
+# can be done in (at least) three ways:
# 1. Modify your $PATH variable to include your clustalw directory as
-# in (for Linux):
-# export PATH=$PATH:/home/peter/clustalw1.8
+# in (for Linux):
+# export PATH=$PATH:/home/peter/clustalw1.8
#
-# 2. define an environmental variable CLUSTALDIR:
-# export CLUSTALDIR=/home/peter/clustalw1.8
+# 2. define an environmental variable CLUSTALDIR:
+# export CLUSTALDIR=/home/peter/clustalw1.8
#
# 3. include a definition of an environmental variable CLUSTALDIR in
-# every script that will use Clustal.pm.
+# every script that will use Clustal.pm.
# $ENV{CLUSTALDIR} = '/home/peter/clustalw1.8/';
$PROGRAMDIR = $ENV{CLUSTALDIR} || '';
@@ -350,7 +354,7 @@ BEGIN {
@OTHER_SWITCHES = qw(QUIET);
# Authorize attribute fields
- foreach my $attr ( @CLUSTALW_PARAMS, @CLUSTALW_SWITCHES,
+ foreach my $attr ( @CLUSTALW_PARAMS, @CLUSTALW_SWITCHES,
@OTHER_SWITCHES ) { $OK_FIELD{$attr}++; }
@@ -363,14 +367,14 @@ sub new {
unless (&exists_clustal()) {
warn "Clustalw program not found as $PROGRAM or not executable. \n Clustalw can be obtained from eg- http://corba.ebi.ac.uk/Biocatalog/Alignment_Search_software.html/ \n";
}
-
+
my ($attr, $value);
(undef,$TMPDIR) = $self->tempdir(CLEANUP=>1);
(undef,$TMPOUTFILE) = $self->tempfile(-dir => $TMPDIR);
while (@args) {
$attr = shift @args;
$value = shift @args;
- next if( $attr =~ /^-/ ); # don't want named parameters
+ next if( $attr =~ /^-/ ); # don't want named parameters
$self->$attr($value);
}
return $self;
@@ -415,7 +419,7 @@ or
$aln = $factory->align($seq_array_ref);
Function: Perform a multiple sequence alignment
Example :
- Returns : Reference to a SimpleAlign object containing the
+ 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.
@@ -478,7 +482,7 @@ sub profile_align {
my $param_string = $self->_setparams();
# run clustalw
- my $aln = $self->_run('profile-aln', $infilename1,
+ my $aln = $self->_run('profile-aln', $infilename1,
$infilename2, $param_string);
}
@@ -490,13 +494,14 @@ sub profile_align {
Usage : Internal function, not to be called directly
Function: makes actual system call to clustalw program
Example :
- Returns : nothing; clustalw output is written to a
+ Returns : nothing; clustalw output is written to a
temporary file $TMPOUTFILE
Args : Name of a file containing a set of unaligned fasta sequences
and hash of parameters to be passed to clustalw
=cut
+
sub _run {
my ($self,$command,$infile1,$infile2,$param_string) = @_;
my $instring;
@@ -526,9 +531,9 @@ sub _run {
# Clean up the temporary files created along the way...
# Replace file suffix with dnd to find name of dendrogram file(s) to delete
foreach my $f ( $infile1, $infile2 ) {
- $f =~ s/\.[^\.]*$// ;
+ $f =~ s/\.[^\.]*$// ;
unlink $f .'.dnd' if( $f ne '' );
- }
+ }
return $aln;
}
@@ -565,12 +570,12 @@ sub _setinput {
if (ref($input) eq "ARRAY") {
# Open temporary file for both reading & writing of BioSeq array
($tfh,$infilename) = $self->tempfile(-dir=>$TMPDIR);
- $temp = Bio::SeqIO->new('-fh'=>$tfh,
+ $temp = Bio::SeqIO->new('-fh'=>$tfh,
'-format' =>'Fasta');
# Need at least 2 seqs for alignment
- unless (scalar(@$input) > 1) {return 0;}
-
+ unless (scalar(@$input) > 1) {return 0;}
+
foreach $seq (@$input) {
unless (ref($seq) eq "Bio::Seq")
{return 0;}
@@ -608,7 +613,7 @@ sub _setinput {
Usage : Internal function, not to be called directly
Function: Create parameter inputs for clustalw program
Example :
- Returns : parameter string to be passed to clustalw
+ Returns : parameter string to be passed to clustalw
during align or profile_align
Args : name of calling object
View
206 Bio/Tools/Run/Alignment/TCoffee.pm
@@ -18,28 +18,30 @@ alignments using the TCoffee program
=head1 SYNOPSIS
-# Build a tcoffee alignment factory
- @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
- $factory = new Bio::Tools::Run::Alignment::TCoffee (@params);
+ # Build a tcoffee alignment factory
+ @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
+ $factory = new Bio::Tools::Run::Alignment::TCoffee (@params);
-# Pass the factory a list of sequences to be aligned.
- $inputfilename = 't/cysprot.fa';
-# $aln is a SimpleAlign object.
- $aln = $factory->align($inputfilename);
+ # Pass the factory a list of sequences to be aligned.
+ $inputfilename = 't/cysprot.fa';
+ # $aln is a SimpleAlign object.
+ $aln = $factory->align($inputfilename);
-# or where @seq_array is an array of Bio::Seq objects
- $seq_array_ref = \@seq_array;
- $aln = $factory->align($seq_array_ref);
+ # or where @seq_array is an array of Bio::Seq objects
+ $seq_array_ref = \@seq_array;
+ $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.:
+ # Or one can pass the factory a pair of (sub)alignments
+ #to be aligned against each other, e.g.:
-# where $aln1 and $aln2 are Bio::SimpleAlign objects.
- $aln = $factory->profile_align($aln1,$aln2);
+ # where $aln1 and $aln2 are Bio::SimpleAlign objects.
+ $aln = $factory->profile_align($aln1,$aln2);
-# Or one can pass the factory an alignment and one or more unaligned sequences to be added to the alignment. For example:
+ # Or one can pass the factory an alignment and one or more
+ # unaligned sequences to be added to the alignment. For example:
-# $seq is a Bio::Seq object.
- $aln = $factory->profile_align($aln1,$seq);
+ # $seq is a Bio::Seq object.
+ $aln = $factory->profile_align($aln1,$seq);
There are various additional options and input formats available. See
the DESCRIPTION section that follows for additional details.
@@ -47,7 +49,7 @@ the DESCRIPTION section that follows for additional details.
=head1 DESCRIPTION
Note: this DESCRIPTION only documents the (Bio)perl interface to
-TCoffee.
+TCoffee.
There are a number of possible parameters one can pass in TCoffee.
One should really read the online manual for the best explaination of
@@ -104,12 +106,12 @@ object, or through get/set methods of the same name (lowercase).
Title : DP_MODE
Args : [string] gotoh_pair_wise, myers_miller_pair_wise,
fasta_pair_wise cfasta_pair_wise
- Default : cfast_fair_wise
- Description : Indicates the type of dynamic programming used by
+ Default : cfast_fair_wise
+ Description : Indicates the type of dynamic programming used by
the program
- gotoh_pair_wise : implementation of the gotoh algorithm
- (quadratic in memory and time)
+ gotoh_pair_wise : implementation of the gotoh algorithm
+ (quadratic in memory and time)
myers_miller_pair_wise : implementation of the Myers and Miller
dynamic programming algorithm ( quadratic in time and linear in
@@ -130,9 +132,9 @@ object, or through get/set methods of the same name (lowercase).
=head2 KTUPLE
- Title : KTUPLE
+ Title : KTUPLE
Args : numeric value
- Default : 1 or 2 (1 for protein, 2 for DNA )
+ Default : 1 or 2 (1 for protein, 2 for DNA )
Description : Indicates the ktuple size for cfasta_pair_wise dp_mode
and fasta_pair_wise. It is set to 1 for proteins, and 2
@@ -141,7 +143,7 @@ object, or through get/set methods of the same name (lowercase).
some residues are grouped under one letter, based on
physicochemical properties:
rk, de, qh, vilm, fy (the other residues are
- not degenerated).
+ not degenerated).
=head2 NDIAGS
@@ -149,7 +151,7 @@ object, or through get/set methods of the same name (lowercase).
Args : numeric value
Default : 0
Description : Indicates the number of diagonals used by the
- fasta_pair_wise algorithm. When set to 0,
+ fasta_pair_wise algorithm. When set to 0,
n_diag=Log (length of the smallest sequence)
=head2 DIAG_MODE
@@ -160,21 +162,21 @@ object, or through get/set methods of the same name (lowercase).
Description : Indicates the manner in which diagonals are scored
- during the fasta hashing.
+ during the fasta hashing.
0 indicates that the score of a diagonal is equal to the
- sum of the scores of the exact matches it contains.
-
-
+ sum of the scores of the exact matches it contains.
+
+
1 indicates that this score is set equal to the score of
the best uninterrupted segment
- 1 can be useful when dealing with fragments of sequences.
+ 1 can be useful when dealing with fragments of sequences.
=head2 SIM_MATRIX
Title : SIM_MATRIX
- Args : string
+ Args : string
Default : vasiliky
Description : Indicates the manner in which the amino acid is being
degenerated when hashing. All the substitution matrix
@@ -188,7 +190,7 @@ object, or through get/set methods of the same name (lowercase).
=head2 MATRIX
Title : MATRIX
- Args :
+ Args :
Default :
Description : This flag is provided for compatibility with
ClustalW. Setting matrix = 'blosum' is equivalent to
@@ -213,7 +215,7 @@ object, or through get/set methods of the same name (lowercase).
Title : GAPEXT
Args : numeric
Default : 0
- Description : Indicates the penalty applied for extending a gap.
+ Description : Indicates the penalty applied for extending a gap.
=head2 COSMETIC_PENALTY
@@ -236,7 +238,7 @@ object, or through get/set methods of the same name (lowercase).
Title : TG_MODE
Args : 0,1,2
Default : 1
- Description : (Terminal Gaps)
+ Description : (Terminal Gaps)
0: indicates that terminal gaps must be panelized with
a gapopen and a gapext penalty.
1: indicates that terminal gaps must be penalized only
@@ -246,9 +248,9 @@ object, or through get/set methods of the same name (lowercase).
=head2 WEIGHT
Title : WEIGHT
- Args : sim or sim_<matrix_name or matrix_file> or integer value
+ Args : sim or sim_<matrix_name or matrix_file> or integer value
Default : sim
-
+
Description : Weight defines the way alignments are weighted when
turned into a library.
@@ -281,7 +283,7 @@ object, or through get/set methods of the same name (lowercase).
(for instance if they come from a structure
super-imposition program). Value is an integer:
- -weight=1000
+ -weight=1000
Note : Weight only affects methods that return an alignment to
T-Coffee, such as ClustalW. On the contrary, the
@@ -298,12 +300,12 @@ object, or through get/set methods of the same name (lowercase).
Description : You may not wish to align all the sequences brought in
by the -in flag. Supplying the seq_to_align flag allows
for this, the file is simply a list of names in Fasta
- format.
+ format.
- However, note that library extension will be carried out
+ However, note that library extension will be carried out
on all the sequences.
-=head2 PARAMETERS FOR TREE COMPUTATION AND OUTPUT
+=head1 PARAMETERS FOR TREE COMPUTATION AND OUTPUT
=head2 NEWTREE
@@ -317,7 +319,7 @@ object, or through get/set methods of the same name (lowercase).
=head2 USETREE
Title : USETREE
- Args : treefile
+ Args : treefile
Default : no file specified
Description : This flag indicates that rather than computing a new
dendrogram, t_coffee can use a pre-computed one. The
@@ -332,21 +334,21 @@ object, or through get/set methods of the same name (lowercase).
Title : TREE_MODE
Args : slow, fast, very_fast
Default : very_fast
- Description : This flag indicates the method used for computing the
- dendrogram.
- slow : the chosen dp_mode using the extended library,
+ Description : This flag indicates the method used for computing the
+ dendrogram.
+ slow : the chosen dp_mode using the extended library,
fast : The fasta dp_mode using the extended library.
- very_fast: The fasta dp_mode using pam250mt.
+ very_fast: The fasta dp_mode using pam250mt.
=head2 QUICKTREE
Title : QUICKTREE
- Args :
- Default :
- Description : This flag is kept for compatibility with ClustalW.
+ Args :
+ Default :
+ Description : This flag is kept for compatibility with ClustalW.
It indicates that: -tree_mode=very_fast
-=head2 PARAMETERS FOR ALIGNMENT OUTPUT
+=head1 PARAMETERS FOR ALIGNMENT OUTPUT
=head2 OUTFILE
@@ -361,23 +363,23 @@ object, or through get/set methods of the same name (lowercase).
Args : format1, format2
Default : clustalw
Description : Indicated format for outputting outputfile
- Supported formats are:
-
- clustalw_aln, clustalw: ClustalW format.
- gcg, msf_aln : Msf alignment.
- pir_aln : pir alignment.
- fasta_aln : fasta alignment.
- phylip : Phylip format.
- pir_seq : pir sequences (no gap).
- fasta_seq : fasta sequences (no gap).
- As well as:
- score_html : causes the output to be a reliability
- plot in HTML
- score_pdf : idem in PDF.
- score_ps : idem in postscript.
-
- More than one format can be indicated:
- -output=clustalw,gcg, score_html
+ Supported formats are:
+
+ clustalw_aln, clustalw: ClustalW format.
+ gcg, msf_aln : Msf alignment.
+ pir_aln : pir alignment.
+ fasta_aln : fasta alignment.
+ phylip : Phylip format.
+ pir_seq : pir sequences (no gap).
+ fasta_seq : fasta sequences (no gap).
+ As well as:
+ score_html : causes the output to be a reliability
+ plot in HTML
+ score_pdf : idem in PDF.
+ score_ps : idem in postscript.
+
+ More than one format can be indicated:
+ -output=clustalw,gcg, score_html
=head2 CASE
@@ -397,7 +399,7 @@ object, or through get/set methods of the same name (lowercase).
=head2 OUT_LIB
Title : OUT_LIB
- Args : name of library, default, no
+ Args : name of library, default, no
Default : default
Description : Sets the name of the library output. Default implies
<run_name>.tc_lib
@@ -418,13 +420,13 @@ object, or through get/set methods of the same name (lowercase).
Description : Causes the output alignment to contain residue numbers
at the end of each line:
-=head2 PARAMETERS FOR GENERIC OUTPUT
+=head1 PARAMETERS FOR GENERIC OUTPUT
=head2 RUN_NAME
Title : RUN_NAME
Args : your run name
- Default :
+ Default :
Description : This flag causes the prefix <your sequences> to be
replaced by <your run name> when renaming the default
files.
@@ -432,7 +434,7 @@ object, or through get/set methods of the same name (lowercase).
=head2 ALIGN
Title : ALIGN
- Args :
+ Args :
Default :
Description : Indicates that the program must produce the
alignment. This flag is here for compatibility with
@@ -441,15 +443,15 @@ object, or through get/set methods of the same name (lowercase).
=head2 QUIET
Title : QUIET
- Args : stderr, stdout, or filename, or nothing
+ Args : stderr, stdout, or filename, or nothing
Default : stderr
- Description : Redirects the standard output to either a file.
- -quiet on its own redirect the output to /dev/null.
+ Description : Redirects the standard output to either a file.
+ -quiet on its own redirect the output to /dev/null.
=head2 CONVERT
Title : CONVERT
- Args :
+ Args :
Default :
Description : Indicates that the program must not compute the
alignment but simply convert all the sequences,
@@ -505,7 +507,7 @@ use Bio::Root::IO;
@ISA = qw(Bio::Root::RootI Bio::Root::IO);
-BEGIN {
+BEGIN {
# You will need to enable TCoffee to find the tcoffee program. This can be done
# in (at least) three ways:
# 1. Modify your $PATH variable to include your tcoffee directory as in (for Linux):
@@ -518,20 +520,20 @@ BEGIN {
$PROGRAMDIR = $ENV{TCOFFEEDIR} || '';
$PROGRAM = Bio::Root::IO->catfile($PROGRAMDIR,'t_coffee');
-
+
@TCOFFEE_PARAMS = qw(IN TYPE PARAMETERS DO_NORMALISE EXTEND
- DP_MODE KTUPLE NDIAGS DIAG_MODE SIM_MATRIX
+ DP_MODE KTUPLE NDIAGS DIAG_MODE SIM_MATRIX
MATRIX GAPOPEN GAPEXT COSMETIC_PENALTY TG_MODE
- WEIGHT SEQ_TO_ALIGN NEWTREE USETREE TREE_MODE
+ WEIGHT SEQ_TO_ALIGN NEWTREE USETREE TREE_MODE
OUTFILE OUTPUT CASE CPU OUT_LIB OUTORDER SEQNOS
RUN_NAME CONVERT);
-
+
@TCOFFEE_SWITCHES = qw(QUICKTREE);
-
+
@OTHER_SWITCHES = qw(QUIET ALIGN KEEPDND);
-
+
# Authorize attribute fields
- foreach my $attr ( @TCOFFEE_PARAMS, @TCOFFEE_SWITCHES, @OTHER_SWITCHES ) {
+ foreach my $attr ( @TCOFFEE_PARAMS, @TCOFFEE_SWITCHES, @OTHER_SWITCHES ) {
$OK_FIELD{$attr}++; }
}
@@ -543,7 +545,7 @@ sub new {
while (@args) {
$attr = shift @args;
$value = shift @args;
- next if( $attr =~ /^-/); # don't want named parameters
+ next if( $attr =~ /^-/); # don't want named parameters
$self->$attr($value);
}
return $self;
@@ -588,7 +590,7 @@ or
$aln = $factory->align($seq_array_ref);
Function: Perform a multiple sequence alignment
Example :
- Returns : Reference to a SimpleAlign object containing the
+ 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.
@@ -608,7 +610,7 @@ sub align {
if (!$infilename) {$self->throw("Bad input data or less than 2 sequences in $input !");}
# Create parameter string to pass to tcoffee program
- $self->{'_in'} = [];
+ $self->{'_in'} = [];
my $param_string = $self->_setparams();
@@ -646,11 +648,11 @@ sub profile_align {
if (!$infilename1 || !$infilename2) {$self->throw("Bad input data: $input1 or $input2 !");}
# Create parameter string to pass to tcoffee program
- $self->{'_in'} = [];
+ $self->{'_in'} = [];
my $param_string = $self->_setparams();
# run tcoffee
- my $aln = $self->_run('profile-aln', $infilename1,
+ my $aln = $self->_run('profile-aln', $infilename1,
$infilename2, $param_string);
}
@@ -662,7 +664,7 @@ sub profile_align {
Usage : Internal function, not to be called directly
Function: makes actual system call to tcoffee program
Example :
- Returns : nothing; tcoffee output is written to a
+ Returns : nothing; tcoffee output is written to a
temporary file $TMPOUTFILE
Args : Name of a file containing a set of unaligned fasta sequences
and hash of parameters to be passed to tcoffee
@@ -686,12 +688,12 @@ sub _run {
my $param_string = shift;
my $instring = "-in=".join(",", @{$self->{'_in'}});
my $commandstring = $PROGRAM." $instring".
- " -output=gcg". " $param_string";
+ " -output=gcg". " $param_string";
# next line is for debugging purposes
if( $self->verbose > 0 ) {
print "tcoffee command = $commandstring \n";
}
-
+
my $status = system($commandstring);
$self->throw( "TCoffee call crashed: $? \n") if( -z $TMPOUTFILE );
@@ -702,18 +704,18 @@ sub _run {
my $in = Bio::AlignIO->new(-file => $outfile, '-format' => 'MSF');
my $aln = $in->next_aln();
-
+
# Replace file suffix with dnd to find name of dendrogram file(s) to delete
if( ! $self->keepdnd ) {
foreach my $f ( $infilename, $infile1, $infile2 ) {
next if( !defined $f || $f eq '');
- $f =~ s/\.[^\.]*$// ;
+ $f =~ s/\.[^\.]*$// ;
# because TCoffee writes these files to the CWD
if( $Bio::Root::IO::PATHSEP ) {
my @line = split(/$Bio::Root::IO::PATHSEP/, $f);
- $f = pop @line;
+ $f = pop @line;
} else {
- (undef, undef, $f) = File::Spec->splitpath($f);
+ (undef, undef, $f) = File::Spec->splitpath($f);
}
unlink $f .'.dnd' if( $f ne '' );
}
@@ -736,9 +738,9 @@ sub _run {
sub _setinput {
my ($self,$input, $suffix) = @_;
- my ($infilename, $seq, $temp, $tfh);
+ my ($infilename, $seq, $temp, $tfh);
# suffix used to distinguish alignment files
-# If $input is not a reference it better be the name of a
+# If $input is not a reference it better be the name of a
# file with the sequence/ alignment data...
if (! ref $input) {
# check that file exists or throw
@@ -750,7 +752,7 @@ sub _setinput {
elsif (ref($input) =~ /ARRAY/i ) {
# Open temporary file for both reading & writing of BioSeq array
($tfh,$infilename) = $self->tempfile();
- $temp = Bio::SeqIO->new('-fh' => $tfh,
+ $temp = Bio::SeqIO->new('-fh' => $tfh,
'-format' => 'Fasta');
unless (scalar(@$input) > 1) {return 0;} # Need at least 2 seqs for alignment
foreach $seq (@$input) {
@@ -762,15 +764,15 @@ sub _setinput {
# $input may be a SimpleAlign object.
elsif ( $input->isa("Bio::SimpleAlign") ) {
# Open temporary file for both reading & writing of SimpleAlign object
- ($tfh, $infilename) = $self->tempfile() if ($suffix ==1
+ ($tfh, $infilename) = $self->tempfile() if ($suffix ==1
|| $suffix == 2 );
- $temp = Bio::AlignIO->new(-fh=>$tfh,
+ $temp = Bio::AlignIO->new(-fh=>$tfh,
'-format' => 'Fasta');
$temp->write_aln($input);
return $infilename;
}
-# or $input may be a single BioSeq object (to be added to
+# or $input may be a single BioSeq object (to be added to
# a previous alignment)
elsif ( $input->isa("Bio::PrimarySeqI") && $suffix==2) {
# Open temporary file for both reading & writing of BioSeq object
@@ -789,7 +791,7 @@ sub _setinput {
Usage : Internal function, not to be called directly
Function: Create parameter inputs for tcoffee program
Example :
- Returns : parameter string to be passed to tcoffee
+ Returns : parameter string to be passed to tcoffee
during align or profile_align
Args : name of calling object
@@ -808,7 +810,7 @@ sub _setparams {
$self->{'_in'} = [ "X".lc($value) ];
} else {
$attr_key = ' -'.$attr_key;
- $param_string .= $attr_key .'='.$value;
+ $param_string .= $attr_key .'='.$value;
}
}
for $attr ( @TCOFFEE_SWITCHES) {
View
8 Bio/Tools/Run/StandAloneBlast.pm
@@ -94,7 +94,7 @@ BLAST executable. Note each BLAST executable has somewhat different
parameters and options. See the BLAST Documentation for a description
or run the BLAST executable from the command line followed solely with
a "-" to see a list of options and default values for that executable;
-eg >blastall -.
+eg E<gt>blastall -.
BLAST parameters can be changed and/or examined at any time after the
factory has been created. The program checks that any
@@ -113,7 +113,7 @@ the parameter for expectation-value cutoff)
Note that for improved script readibility one can modify the name of
the BLAST parameters as desired as long as the initial letter (and
case) of the parameter are preserved, eg
-$factory->expectvalue($expectvalue); Unfortunately, some of the BLAST
+$factory-E<gt>expectvalue($expectvalue); Unfortunately, some of the BLAST
parameters are not the single letter one might expect (eg "iteration
round" in blastpgp is 'j'). Again one can check by using (eg)
@@ -145,7 +145,7 @@ available. The filename is set by the in the 'outfile' parameter and
has the default value of "blastreport.out".
When using the Blast.pm parser, only a default configuration is currently supported:
-
+
-signif => $self->e() || 1e-5, # where $self->e(), if set, is the BLAST cutoff value
-parse => 1,
-stats => 1,
@@ -153,7 +153,7 @@ When using the Blast.pm parser, only a default configuration is currently suppor
If it is desired to parse the resulting report with Blast.pm with
other values, the user can save the report in the file given by
- $factory->outfile('outputfilelocation')
+ $factory-E<gt>outfile('outputfilelocation')
and then reading that file with Blast.pm using any parameters desired.

0 comments on commit 346f7f2

Please sign in to comment.
Something went wrong with that request. Please try again.