Bio::T...TCoffee(3pm)

πŸ“¦
version 1.7.4 Β· 3 versions
, in debian bookworm, debian trixie

πŸ’– NAME πŸ’–

Bio::Tools::Run::Alignment::TCoffee β€” the object that runs the TCoffee program for you and hands back a multiple sequence alignment built from a pile of unaligned sequences or alignments. It's giving "wrapper module, but make it serve". πŸ‘‘

This one lives in the Bio::T...TCoffee(3pm) manual page, under User Contributed Perl Documentation, bestie. ✨


🌸 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 πŸ¦‹

Quick note bestie: this DESCRIPTION only documents the (Bio)perl interface to TCoffee. That's it, that's the scope. πŸ’…


🌈 Helping the module find your executable

Okay so real talk β€” you gotta let TCoffee actually find the t_coffee program. There's (at least) three ways to make that happen, pick your fighter:

  1. Make sure the t_coffee executable is in your path so that which t_coffee returns a t_coffee executable on your system. Easiest of the easy. ✨
  2. Define an environmental variable TCOFFEEDIR which is a dir which contains the 't_coffee' app.

In bash:

export TCOFFEEDIR=/home/username/progs/T-COFFEE_distribution_Version_1.37/bin

In csh/tcsh:

setenv TCOFFEEDIR /home/username/progs/T-COFFEE_distribution_Version_1.37/bin
  1. Include a definition of an environmental variable TCOFFEEDIR in every 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 options 2 or 3 to set the variables. No cap, webserver envs be forgetting things. 😭

πŸ‘‘ INTERNAL METHODS πŸ‘‘

πŸ’… _numeric_version

Version "numbers" are not numeric values, bestie. 😭 In the case of T-Coffee, they have a 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 : _run
  • 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 temporary file OR specified output file
  • Args : Name of a file containing a set of unaligned fasta sequences and hash of parameters to be passed to tcoffee

πŸŽ€ _setinput

  • Title : _setinput
  • Usage : Internal function, not to be called directly
  • Function : Create input file for tcoffee program
  • Example :
  • Returns : name of file containing tcoffee data input AND type 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 : _setparams
  • Usage : Internal function, not to be called directly
  • Function : Create parameter inputs for tcoffee program
  • Example :
  • Returns : parameter string to be passed to tcoffee during align or profile_align
  • Args : name of calling object

πŸ’– PARAMETERS FOR ALIGNMENT COMPUTATION πŸ’–

okay bestie, so like… there are a lot of params you can throw at T-Coffee, and honestly the real tea is in the online manual, go read that for the full ✨why✨. Peep this:

http://igs-server.cnrs-mrs.fr/~cnotred/Documentation/t_coffee/t_coffee_doc.html

You can pass these in two ways: literally hand them over when you instantiate a new TCoffee object, or poke at them through the get/set methods that share the exact same name (lowercase, bestie, lowercase).


🌸 IN

  • Title: IN
  • Description: (optional) input filename. Ngl this one gets set when you align, so don't go touching it directly unless you truly understand the TCoffee program very well. like, in your bones.

πŸŽ€ TYPE

  • Title: TYPE
  • Args: [string] DNA, PROTEIN
  • Description: (optional) sets the sequence type. It's guessed automatically anyway, so again β€” don't use this directly, she doesn't need your help.

πŸ¦‹ PARAMETERS

  • Title: PARAMETERS
  • Description: (optional) points at a file that's holding extra parameters. very "bring snacks to the function" energy.

πŸ”₯ EXTEND

  • Title: EXTEND
  • Args: 0, 1, or any positive value
  • Default: 1
  • Description: flag that says whether library extension should happen while doing multiple alignments.
    • set it to 0 β†’ no extension, periodt.
    • set it to 1 β†’ extension happens on all pairs in the library.
    • set it to literally any other positive value β†’ extension only happens on pairs whose weight value is superior to that limit you specified.

✨ DP_NORMALISE ✨

  • Title: DP_NORMALISE
  • Args: 0 or any positive value
  • Default: 1000
  • Description: when you use anything other than 0, this flag sets the score of the highest scoring pair to 1000. iconic behaviour, honestly.

πŸ’… DP_MODE πŸ’…

  • Title: DP_MODE
  • Args: [string] gotoh_pair_wise, myers_miller_pair_wise, fasta_pair_wise cfasta_pair_wise
  • Default: cfast_fair_wise
  • Description: tells the program which flavour of dynamic programming it should be running. the options:
    • gotoh_pair_wise : the gotoh algorithm implementation. quadratic in memory and time, so she's a little hungry.
    • myers_miller_pair_wise : the Myers and Miller dynamic programming algorithm β€” quadratic in time but linear in space. This one is recommended for very long sequences. It's about 2 time slower than gotoh. Heads up: it only accepts tg_mode=1.
    • fasta_pair_wise : the fasta algorithm implementation. The sequence gets hashed, looking for ktuples words. Dynamic programming only runs on the ndiag best scoring diagonals. Much faster, but less accurate than the two previous ones. trade-off queen.
    • cfasta_pair_wise : the c stands for checked. Same algorithm, but the dynamic programming is made on the ndiag best diagonals, and then on the 2*ndiags, and so on until the scores converge. Complexity depends on how divergent your sequences are, but will usually be L*log(L), with accuracy comparable to the two first modes (this was checked on BaliBase, so like… receipts πŸ’…).

🧚 KTUPLE 🧚

  • Title: KTUPLE
  • Args: numeric value
  • 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's set to 1 for proteins and 2 for DNA. The alphabet used for protein is not the 20 letter code β€” it's a mildly degenerated version where some residues get grouped under one letter based on physicochemical properties: rk, de, qh, vilm, fy (the other residues are not degenerated). cute little clusters.

⭐ NDIAGS ⭐

  • Title: NDIAGS
  • Args: numeric value
  • Default: 0
  • Description: indicates the number of diagonals used by the fasta_pair_wise algorithm. When it's set to 0, n_diag=Log (length of the smallest sequence). math is doing its thing, we respect her.

🌈 DIAG_MODE 🌈

  • Title: DIAG_MODE
  • Args: numeric value
  • Default: 0
  • Description: indicates the manner in which diagonals are scored during the fasta hashing.
    • 0 β†’ the score of a diagonal equals the sum of the scores of the exact matches it contains.
    • 1 β†’ this score is set equal to the score of the best uninterrupted segment.

1 can be useful when you're dealing with fragments of sequences. lowkey a niche fave.

πŸ’œ SIM_MATRIX πŸ’œ

  • Title: SIM_MATRIX
  • Args: string
  • Default: vasiliky
  • Description: indicates the manner in which the amino acid gets degenerated when hashing. All the substitution matrices are acceptable, no gatekeeping. Categories get defined as sub-groups of residues that all have a positive substitution score (they can overlap, it's giving polycule).

If you wish to keep the non degenerated amino acid alphabet, use 'idmat'.

πŸ“ MATRIX πŸ“

  • Title: MATRIX
  • Args:
  • Default:
  • Description: this flag exists purely for compatibility with ClustalW, bestie. Setting matrix = 'blosum' is equivalent to -in=Xblosum62mt, and -matrix=pam is equivalent to in=Xpam250mt. Apart from this, the rules are similar to those applying when declaring a matrix with the -in=X fl

πŸ’€ GAPOPEN πŸ’€

  • Title: GAPOPEN
  • Args: numeric
  • Default: 0
  • Description: indicates the penalty applied for opening a gap. The penalty must be negative. If you hand it a positive value, it will automatically be turned into a negative number (it does not trust your judgement, and honestly, fair). We recommend a value of 10 with pam matrices, and a value of 0 when a library is used.

🫢 GAPEXT 🫢

  • Title: GAPEXT
  • Args: numeric
  • Default: 0
  • Description: indicates the penalty applied for extending a gap. that's it, that's the tweet.

πŸ‘‘ COSMETIC_PENALTY πŸ‘‘

  • Title: COSMETIC_PENALTY
  • Args: numeric
  • Default: 100
  • Description: indicates the penalty applied for opening a gap. This penalty is set to a very low value. It will only have an influence on the portions of the alignment that are unalignable. It will not make them more correct β€” it only makes them more pleasing to the eye (i.e. avoid stretches of lonely residues). it's doing makeup, not surgery, okay?

The cosmetic penalty is automatically turned off if a substitution matrix is used rather than a library.

πŸ”₯ TG_MODE πŸ”₯

  • Title: TG_MODE
  • Args: 0,1,2
  • Default: 1
  • 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 with a gapext penalty.
    • 2 : indicates that terminal gaps must not be penalized. zero consequences, free real estate.

✨ WEIGHT ✨

  • Title: WEIGHT
  • 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.
    • sim indicates that the weight equals the average identity within the match residues.
    • sim_matrix_name indicates the average identity with two residues regarded as identical when their substitution value is positive. The valid matrices names are in matrices.h (pam250mt). Matrices not found in this header are considered to be filenames β€” see the format section for matrices. For instance, -weight=sim_pam250mt indicates that the grouping used for similarity will be the set of classes with positive substitutions. Other groups include
      • sim_clustalw_col ( categories of clustalw marked with :)
      • sim_clustalw_dot ( categories of clustalw marked with .)
    • Value indicates that all the pairs found in the alignments must be given the same weight equal to value. This is useful when the alignment one wishes to turn into a library must be given a pre-specified score (for instance if they come from a structure super-imposition program). Value is an integer:
-weight=1000
  • Note: Weight only affects methods that return an alignment to T-Coffee, such as ClustalW. On the contrary, the version of Lalign we use here returns a library where weights have already been applied and are therefore insensitive to the -weight flag. so like, don't @ her about it.

πŸŽ€ SEQ_TO_ALIGN πŸŽ€

  • Title: SEQ_TO_ALIGN
  • Args: filename
  • Default: no file β€” align all the sequences
  • Description: maybe you don't wanna align all the sequences that got brought in by the -in flag? totally valid. Supplying the seq_to_align flag allows for this β€” the file is simply a list of names in Fasta format.

However, note that library extension will be carried out on all the sequences. yes, all of them. no sneaky exemptions. πŸ’…

🌳 PARAMETERS FOR TREE COMPUTATION AND OUTPUT 🌳

okay bestie, this is the tree-computing part. let's get into it πŸ’…

🌱 NEWTREE 🌱

  • Title: NEWTREE
  • Args: treefile
  • Default: no file
  • Description: bestie, this tells you the name of the new tree to compute. if you don't pick one, the default will be <sequence_name>.dnd, or <run_name.dnd>. Format is Phylip/Newick tree format. periodt 🌈

🌲 USETREE 🌲

  • Title: USETREE
  • Args: treefile
  • Default: no file specified
  • Description: this flag is giving "instead of computing a new dendrogram, t_coffee can use a pre-computed one." the tree files are in phylips format and compatible with ClustalW. lowkey, in most cases, using a pre-computed tree will halve the computation time required by t_coffee. it is also possible to use trees output by ClustalW or Phylips. Format is Phylips tree format. slay πŸ¦‹

🌳 TREE_MODE 🌳

  • Title: TREE_MODE
  • Args: slow, fast, very_fast
  • Default: very_fast
  • Description: this flag says which method is 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.

⚑ QUICKTREE ⚑

  • Title: QUICKTREE
  • Args:
  • Default:
  • Description: this flag is kept for compatibility with ClustalW. it indicates that: -tree_mode=very_fast πŸ”₯

πŸŽ€ PARAMETERS FOR ALIGNMENT OUTPUT πŸŽ€

πŸ“ OUTFILE πŸ“

  • Title: OUTFILE
  • Args: out_aln file, default, no
  • Default: default ( yourseqfile.aln)
  • Description: indicates name of output alignment file. yes bestie, that's the whole vibe πŸ’–

πŸ“€ OUTPUT πŸ“€

  • Title: OUTPUT
  • 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

πŸ”  CASE πŸ” 

  • Title: CASE
  • Args: upper, lower
  • Default: upper
  • Description: triggers choice of the case for output. iconic 🫢

⏱️ CPU ⏱️

  • Title: CPU
  • Args: value
  • Default: 0
  • Description: Indicates the cpu time (micro seconds) that must be added to the t_coffee computation time.

πŸ“š OUT_LIB πŸ“š

  • Title: OUT_LIB
  • Args: name of library, default, no
  • Default: default
  • Description: Sets the name of the library output. Default implies <run_name>.tc_lib

πŸ“š OUTORDER πŸ“š

  • Title: OUTORDER
  • Args: input or aligned
  • Default: input
  • Description: Sets the name of the library output. Default implies <run_name>.tc_lib

πŸ”’ SEQNOS πŸ”’

  • Title: SEQNOS
  • Args: on or off
  • Default: off
  • Description: Causes the output alignment to contain residue numbers at the end of each line:

✨ PARAMETERS FOR GENERIC OUTPUT ✨

🏷️ RUN_NAME 🏷️

  • Title: RUN_NAME
  • Args: your run name
  • Default:
  • Description: this flag causes the prefix <your sequences> to be replaced by <your run name> when renaming the default files.

βœ… ALIGN βœ…

  • Title: ALIGN
  • Args:
  • Default:
  • Description: Indicates that the program must produce the alignment. This flag is here for compatibility with ClustalW

🀫 QUIET 🀫

  • Title: QUIET
  • 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.

πŸ”„ CONVERT πŸ”„

  • Title: CONVERT
  • Args:
  • Default:
  • Description: Indicates that the program must not compute the alignment but simply convert all the sequences, alignments and libraries into the format indicated with -output. This flag can also be used if you simply want to compute a library ( i.e. You have an alignment and you want to turn it into a library).

🧬 program_name 🧬

  • Title: program_name
  • Usage: $factory->program_name()
  • Function: holds the program name
  • Returns: string
  • Args: None

πŸ“‚ program_dir πŸ“‚

  • Title: program_dir
  • Usage: $factory->program_dir(@params)
  • Function: returns the program directory, obtained from ENV variable.
  • Returns: string
  • Args:

🚨 error_string 🚨

  • Title: error_string
  • Usage: $obj->error_string($newval)
  • Function: Where the output from the last analysus run is stored.
  • Returns: value of error_string
  • Args: newvalue (optional)

πŸ”’ version πŸ”’

  • Title: version
  • Usage: $prog->version()
  • Function: Determine the version number of the program
  • Example:
  • Returns: string
  • Args: none

πŸƒ run πŸƒ

  • Title: run
  • Usage:
my $output = $application->run(-seq     => $seq,
                               -profile => $profile,
                               -type    => 'profile-aln');
  • Function: Generic run of an application
  • Returns: Bio::SimpleAlign object
  • Args: key-value parameters allowed for TCoffee runs AND
    • -type => profile-aln or alignment for profile alignments or just multiple sequence alignment
    • -seq => either Bio::PrimarySeqI object OR array ref of Bio::PrimarySeqI objects OR filename of sequences to run with
    • -profile => profile to align to, if this is an array ref will specify the first two entries as the two profiles to align to each other

🧬 align 🧬

  • Title: align
  • Usage:
$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 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.

🧬 profile_align 🧬

  • Title: profile_align
  • Usage:
  • Function: Perform an alignment of 2 (sub)alignments
  • Example:
  • 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.
  • Note: Needs to be updated to run with newer TCoffee code, which allows more than two profile alignments.

Throws an exception if arguments are not either strings (eg filenames) or references to SimpleAlign objects.

🎨 aformat 🎨

  • Title: aformat
  • Usage: my $alignmentformat = $self->aformat();
  • Function: Get/Set alignment format
  • Returns: string
  • Args: string

πŸ› οΈ methods πŸ› οΈ

  • Title: methods
  • Usage: my @methods = $self->methods()
  • Function: Get/Set Alignment methods - NOT VALIDATED
  • Returns: array of strings
  • Args: arrayref of strings

🧬 Bio::Tools::Run::BaseWrapper methods 🧬

🚫 no_param_checks 🚫

  • 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)

πŸ’Ύ save_tempfiles πŸ’Ύ

  • Title: save_tempfiles
  • Usage: $obj->save_tempfiles($newval)
  • Function:
  • Returns: value of save_tempfiles
  • Args: newvalue (optional)

πŸ“„ outfile_name πŸ“„

  • 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

πŸ“ tempdir πŸ“

  • 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

🧹 cleanup 🧹

  • Title: cleanup
  • Usage: $tcoffee->cleanup();
  • Function: Will cleanup the tempdir directory
  • Returns: none
  • Args: none

πŸ”Œ io πŸ”Œ

  • Title: io
  • Usage: $obj->io($newval)
  • Function: Gets a L<Bio::Root::IO> object
  • Returns: 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.

bioperl-l@bioperl.org              - General discussion
http://bioperl.org/Support.html    - About the mailing lists

🫢 Support 🫢

Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org

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 <jason@bioperl.org>
  • Peter Schattner <schattner@alum.mit.edu>

This software is copyright (c) by Jason Stajich <jason@bioperl.org>, and by Peter Schattner <schattner@alum.mit.edu>.

This software is available under the same terms as the perl 5 programming language system itself.


πŸ’– okay bestie, that's the whole page, and you ate. source/version: perl v5.34.0, date: 2022-10-14, from Bio::T...TCoffee(3pm) β€” periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from