NAME
Bio::Tools::Run::Alignment::TCoffee - Object for the calculation of a multiple sequence alignment from a set of unaligned sequences or alignments using the TCoffee program
VERSION
version 1.7.4
SYNOPSIS
# Build a tcoffee alignment factory@params = ('ktuple' => 2, 'matrix' => 'BLOSUM');$factory = Bio::Tools::Run::Alignment::TCoffee->new(@params);# 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 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);# 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);#There are various additional options and input formats available.#See the DESCRIPTION section that follows for additional details.
DESCRIPTION
Note: this DESCRIPTION only documents the (Bio)perl interface to TCoffee.
Helping the module find your executable
You will need to enable TCoffee to find the t_coffee program. This can be done in (at least) three ways:
1. Make sure the t_coffee executable is in your path so thatwhich t_coffee returns a t_coffee executable on your system.2. Define an environmental variable TCOFFEEDIR which is a dirwhich contains the 't_coffee' app:In bashexport TCOFFEEDIR=/home/username/progs/T-COFFEE_distribution_Version_1.37/binIn csh/tcshsetenv TCOFFEEDIR /home/username/progs/T-COFFEE_distribution_Version_1.37/bin3. Include a definition of an environmental variable TCOFFEEDIR inevery script that will use this TCoffee wrapper module.BEGIN { $ENV{TCOFFEDIR} = '/home/username/progs/T-COFFEE_distribution_Version_1.37/bin' }use Bio::Tools::Run::Alignment::TCoffee;
If you are running an application on a webserver make sure the webserver environment has the proper PATH set or use the options 2 or 3 to set the variables.
INTERNAL METHODS
_numeric_version
Version "numbers" are not numeric values. In the case of T-Coffee, they have an hash component at their end. This was not the case in older releases. We use the first two numeric parts to do different things though. See also issue #1.
_run
Title : _runUsage : Internal function, not to be called directlyFunction: makes actual system call to tcoffee programExample :Returns : nothing; tcoffee output is written to atemporary file OR specified output fileArgs : Name of a file containing a set of unaligned fasta sequencesand hash of parameters to be passed to tcoffee
_setinput
Title : _setinputUsage : Internal function, not to be called directlyFunction: Create input file for tcoffee programExample :Returns : name of file containing tcoffee data input ANDtype of file (if known, S for sequence, L for sequence library,A for sequence alignment)Args : Seq or Align object reference or input file name
_setparams
Title : _setparamsUsage : Internal function, not to be called directlyFunction: Create parameter inputs for tcoffee programExample :Returns : parameter string to be passed to tcoffeeduring align or profile_alignArgs : name of calling object
PARAMETERS FOR ALIGNMENT COMPUTATION
There are a number of possible parameters one can pass in TCoffee. One should really read the online manual for the best explanation of all the features. See http://igs-server.cnrs-mrs.fr/~cnotred/Documentation/t_coffee/t_coffee_doc.html
These can be specified as parameters when instantiating a new TCoffee object, or through get/set methods of the same name (lowercase).
IN
Title : INDescription : (optional) input filename, this is specified whenalign so should not use this directly unless oneunderstand TCoffee program very well.
TYPE
Title : TYPEArgs : [string] DNA, PROTEINDescription : (optional) set the sequence type, guessed automaticallyso should not use this directly
PARAMETERS
Title : PARAMETERSDescription : (optional) Indicates a file containing extra parameters
EXTEND
Title : EXTENDArgs : 0, 1, or positive valueDefault : 1Description : Flag indicating that library extension should becarried out when performing multiple alignments, if setto 0 then extension is not made, if set to 1 extensionis made on all pairs in the library. If extension isset to another positive value, the extension is onlycarried out on pairs having a weight value superior tothe specified limit.
DP_NORMALISE
Title : DP_NORMALISEArgs : 0 or positive valueDefault : 1000Description : When using a value different from 0, this flag sets thescore of the highest scoring pair to 1000.
DP_MODE
Title : DP_MODEArgs : [string] gotoh_pair_wise, myers_miller_pair_wise,fasta_pair_wise cfasta_pair_wiseDefault : cfast_fair_wiseDescription : Indicates the type of dynamic programming used bythe programgotoh_pair_wise : implementation of the gotoh algorithm(quadratic in memory and time)myers_miller_pair_wise : implementation of the Myers and Millerdynamic programming algorithm ( quadratic in time and linear inspace). This algorithm is recommended for very long sequences. Itis about 2 time slower than gotoh. It only accepts tg_mode=1.fasta_pair_wise: implementation of the fasta algorithm. Thesequence is hashed, looking for ktuples words. Dynamic programmingis only carried out on the ndiag best scoring diagonals. This ismuch faster but less accurate than the two previous.cfasta_pair_wise : c stands for checked. It is the samealgorithm. The dynamic programming is made on the ndiag bestdiagonals, and then on the 2*ndiags, and so on until the scoresconverge. Complexity will depend on the level of divergence of thesequences, but will usually be L*log(L), with an accuracycomparable to the two first mode ( this was checked on BaliBase).
KTUPLE
Title : KTUPLEArgs : numeric valueDefault : 1 or 2 (1 for protein, 2 for DNA )Description : Indicates the ktuple size for cfasta_pair_wise dp_modeand fasta_pair_wise. It is set to 1 for proteins, and 2for DNA. The alphabet used for protein is not the 20letter code, but a mildly degenerated version, wheresome residues are grouped under one letter, based onphysicochemical properties:rk, de, qh, vilm, fy (the other residues arenot degenerated).
NDIAGS
Title : NDIAGSArgs : numeric valueDefault : 0Description : Indicates the number of diagonals used by thefasta_pair_wise algorithm. When set to 0,n_diag=Log (length of the smallest sequence)
DIAG_MODE
Title : DIAG_MODEArgs : numeric valueDefault : 0Description : Indicates the manner in which diagonals are scoredduring the fasta hashing.0 indicates that the score of a diagonal is equal to thesum of the scores of the exact matches it contains.1 indicates that this score is set equal to the score ofthe best uninterrupted segment1 can be useful when dealing with fragments of sequences.
SIM_MATRIX
Title : SIM_MATRIXArgs : stringDefault : vasilikyDescription : Indicates the manner in which the amino acid is beingdegenerated when hashing. All the substitution matrixare acceptable. Categories will be defined as sub-groupof residues all having a positive substitution score(they can overlap).If you wish to keep the non degenerated amino acidalphabet, use 'idmat'
MATRIX
Title : MATRIXArgs :Default :Description : This flag is provided for compatibility withClustalW. Setting matrix = 'blosum' is equivalent to-in=Xblosum62mt , -matrix=pam is equivalent toin=Xpam250mt . Apart from this, the rules are similarto those applying when declaring a matrix with the-in=X fl
GAPOPEN
Title : GAPOPENArgs : numericDefault : 0Description : Indicates the penalty applied for opening a gap. Thepenalty must be negative. If you provide a positivevalue, it will automatically be turned into a negativenumber. We recommend a value of 10 with pam matrices,and a value of 0 when a library is used.
GAPEXT
Title : GAPEXTArgs : numericDefault : 0Description : Indicates the penalty applied for extending a gap.
COSMETIC_PENALTY
Title : COSMETIC_PENALTYArgs : numericDefault : 100Description : Indicates the penalty applied for opening a gap. Thispenalty is set to a very low value. It will only havean influence on the portions of the alignment that areunalignable. It will not make them more correct, butonly more pleasing to the eye ( i.e. Avoid stretches oflonely residues).The cosmetic penalty is automatically turned off if asubstitution matrix is used rather than a library.
TG_MODE
Title : TG_MODEArgs : 0,1,2Default : 1Description : (Terminal Gaps)0: indicates that terminal gaps must be panelized witha gapopen and a gapext penalty.1: indicates that terminal gaps must be penalized onlywith a gapext penalty2: indicates that terminal gaps must not be penalized.
WEIGHT
Title : WEIGHTArgs : sim or sim_<matrix_name or matrix_file> or integer valueDefault : simDescription : Weight defines the way alignments are weighted whenturned into a library.sim indicates that the weight equals the averageidentity within the match residues.sim_matrix_name indicates the average identity with tworesidues regarded as identical when theirsubstitution value is positive. The valid matricesnames are in matrices.h (pam250mt) . Matrices notfound in this header are considered to befilenames. See the format section for matrices. Forinstance, -weight=sim_pam250mt indicates that thegrouping used for similarity will be the set ofclasses with positive substitutions. Other groupsincludesim_clustalw_col ( categories of clustalwmarked with :)sim_clustalw_dot ( categories of clustalwmarked with .)Value indicates that all the pairs found in thealignments must be given the same weight equal tovalue. This is useful when the alignment one wishes toturn into a library must be given a pre-specified score(for instance if they come from a structuresuper-imposition program). Value is an integer:-weight=1000Note : Weight only affects methods that return an alignment toT-Coffee, such as ClustalW. On the contrary, theversion of Lalign we use here returns a library whereweights have already been applied and are thereforeinsensitive to the -weight flag.
SEQ_TO_ALIGN
Title : SEQ_TO_ALIGNArgs : filenameDefault : no file - align all the sequencesDescription : You may not wish to align all the sequences brought inby the -in flag. Supplying the seq_to_align flag allowsfor this, the file is simply a list of names in Fastaformat.However, note that library extension will be carried outon all the sequences.
PARAMETERS FOR TREE COMPUTATION AND OUTPUT
NEWTREE
Title : NEWTREEArgs : treefileDefault : no fileDescription : Indicates the name of the new tree to compute. Thedefault will be <sequence_name>.dnd, or <run_name.dnd>.Format is Phylip/Newick tree format
USETREE
Title : USETREEArgs : treefileDefault : no file specifiedDescription : This flag indicates that rather than computing a newdendrogram, t_coffee can use a pre-computed one. Thetree files are in phylips format and compatible withClustalW. In most cases, using a pre-computed tree willhalve the computation time required by t_coffee. It isalso possible to use trees output by ClustalW orPhylips. Format is Phylips tree format
TREE_MODE
Title : TREE_MODEArgs : slow, fast, very_fastDefault : very_fastDescription : This flag indicates the method used for computing thedendrogram.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.
QUICKTREE
Title : QUICKTREEArgs :Default :Description : This flag is kept for compatibility with ClustalW.It indicates that: -tree_mode=very_fast
PARAMETERS FOR ALIGNMENT OUTPUT
OUTFILE
Title : OUTFILEArgs : out_aln file, default, noDefault : default ( yourseqfile.aln)Description : indicates name of output alignment file
OUTPUT
Title : OUTPUTArgs : format1, format2Default : clustalwDescription : Indicated format for outputting outputfileSupported 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 reliabilityplot in HTMLscore_pdf : idem in PDF.score_ps : idem in postscript.More than one format can be indicated:-output=clustalw,gcg, score_html
CASE
Title : CASEArgs : upper, lowerDefault : upperDescription : triggers choice of the case for output
CPU
Title : CPUArgs : valueDefault : 0Description : Indicates the cpu time (micro seconds) that must beadded to the t_coffee computation time.
OUT_LIB
Title : OUT_LIBArgs : name of library, default, noDefault : defaultDescription : Sets the name of the library output. Default implies<run_name>.tc_lib
OUTORDER
Title : OUTORDERArgs : input or alignedDefault : inputDescription : Sets the name of the library output. Default implies<run_name>.tc_lib
SEQNOS
Title : SEQNOSArgs : on or offDefault : offDescription : Causes the output alignment to contain residue numbersat the end of each line:
PARAMETERS FOR GENERIC OUTPUT
RUN_NAME
Title : RUN_NAMEArgs : your run nameDefault :Description : This flag causes the prefix <your sequences> to bereplaced by <your run name> when renaming the defaultfiles.
ALIGN
Title : ALIGNArgs :Default :Description : Indicates that the program must produce thealignment. This flag is here for compatibility withClustalW
QUIET
Title : QUIETArgs : stderr, stdout, or filename, or nothingDefault : stderrDescription : Redirects the standard output to either a file.-quiet on its own redirect the output to /dev/null.
CONVERT
Title : CONVERTArgs :Default :Description : Indicates that the program must not compute thealignment but simply convert all the sequences,alignments and libraries into the format indicated with-output. This flag can also be used if you simply wantto compute a library ( i.e. You have an alignment andyou want to turn it into a library).
program_name
Title : program_nameUsage : $factory->program_name()Function: holds the program nameReturns: stringArgs : None
program_dir
Title : program_dirUsage : $factory->program_dir(@params)Function: returns the program directory, obtained from ENV variable.Returns: stringArgs :
error_string
Title : error_stringUsage : $obj->error_string($newval)Function: Where the output from the last analysus run is stored.Returns : value of error_stringArgs : newvalue (optional)
version
Title : versionUsage : $prog->version()Function: Determine the version number of the programExample :Returns : stringArgs : none
run
Title : runUsage : my $output = $application->run(-seq => $seq,-profile => $profile,-type => 'profile-aln');Function: Generic run of an applicationReturns : Bio::SimpleAlign objectArgs : key-value parameters allowed for TCoffee runs AND-type => profile-aln or alignment for profile alignments orjust multiple sequence alignment-seq => either Bio::PrimarySeqI object ORarray ref of Bio::PrimarySeqI objects ORfilename of sequences to run with-profile => profile to align to, if this is an array refwill specify the first two entries as the twoprofiles to align to each other
align
Title : alignUsage :$inputfilename = 't/data/cysprot.fa';$aln = $factory->align($inputfilename);or$seq_array_ref = \@seq_array;# @seq_array is array of Seq objs$aln = $factory->align($seq_array_ref);Function: Perform a multiple sequence alignmentReturns : Reference to a SimpleAlign object containing thesequence alignment.Args : Name of a file containing a set of unaligned fasta sequencesor else an array of references to Bio::Seq objects.Throws an exception if argument is not either a string (eg afilename) or a reference to an array of Bio::Seq objects. Ifargument is string, throws exception if file corresponding to stringname can not be found. If argument is Bio::Seq array, throwsexception if less than two sequence objects are in array.
profile_align
Title : profile_alignUsage :Function: Perform an alignment of 2 (sub)alignmentsExample :Returns : Reference to a SimpleAlign object containing the (super)alignment.Args : Names of 2 files containing the subalignmentsor references to 2 Bio::SimpleAlign objects.Note : Needs to be updated to run with newer TCoffee code, whichallows more than two profile alignments.
Throws an exception if arguments are not either strings (eg filenames) or references to SimpleAlign objects.
aformat
Title : aformatUsage : my $alignmentformat = $self->aformat();Function: Get/Set alignment formatReturns : stringArgs : string
methods
Title : methodsUsage : my @methods = $self->methods()Function: Get/Set Alignment methods - NOT VALIDATEDReturns : array of stringsArgs : arrayref of strings
Bio::Tools::Run::BaseWrapper methods
no_param_checks
Title : no_param_checksUsage : $obj->no_param_checks($newval)Function: Boolean flag as to whether or not we shouldtrust the sanity checks for parameter valuesReturns : value of no_param_checksArgs : newvalue (optional)
save_tempfiles
Title : save_tempfilesUsage : $obj->save_tempfiles($newval)Function:Returns : value of save_tempfilesArgs : newvalue (optional)
outfile_name
Title : outfile_nameUsage : 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 : stringArgs : [optional] string to set value to
tempdir
Title : tempdirUsage : my $tmpdir = $self->tempdir();Function: Retrieve a temporary directory name (which is created)Returns : string which is the name of the temporary directoryArgs : none
cleanup
Title : cleanupUsage : $tcoffee->cleanup();Function: Will cleanup the tempdir directoryReturns : noneArgs : none
io
Title : ioUsage : $obj->io($newval)Function: Gets a L<Bio::Root::IO> objectReturns : L<Bio::Root::IO>Args : none
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/Support.html - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list: [email protected]
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:
https://github.com/bioperl/bio-tools-run-alignment-tcoffee/issues
AUTHORS
Jason Stajich <[email protected]>
Peter Schattner <[email protected]>
COPYRIGHT
This software is copyright (c) by Jason Stajich <[email protected]>, and by Peter Schattner <[email protected]>.
This software is available under the same terms as the perl 5 programming language system itself.