Bio::T...::Lagan(3pm)
π NAME π
Bio::Tools::Run::Alignment::Lagan β bestie, this is the object that runs the whole LAGAN suite of tools locally, MLAGAN for multiple sequence alignments included π§¬β¨
β¨ SYNOPSIS β¨
okay so here's the vibe, literally just set up your params like this:
use Bio::Tools::Run::Alignment::Lagan;
@params =
('chaos' => "The contents of this string will be passed as args to chaos",
#Read you chaos README file for more info/This functionality
#has not been tested and will be integrated in future versions.
'order' => "\"-gs -7 -gc -2 -mt 2 -ms -1\"",
#Where gap start penalty of- 7, gap continue of -2, match of 2,
#and mismatch of -1.
'recurse' => "\"(12,25),(7,25),(4,30)"\",
#A list of (wordlength,score cutoff) pairs to be used in the
#recursive anchoring
'tree' => "\"(sample1 (sample2 sample3))"\",
#Used by mlagan / tree can also be passed when calling mlagan directly
#SCORING PARAMETERS FOR MLAGAN:
'match' => 12,
'mismatch' => -8,
'gapstart' => -50,
'gapend' => -50,
'gapcont' => -2,
);
πΈ DESCRIPTION πΈ
so to run mlagan/lagan you need an environment variable pointing at the directory with the executables, like files lagan.pl etc. It goes a lil something like:
LAGAN_DIR=/opt/lagan_executables/
and no, just having the executables chillin' in your path is not supported π« because the executables themselves literally only work with the environment variable set. it's giving β¨needyβ¨ but we respect it.
every lagan and mlagan parameter listed in their Readmes can be set β except for the mfa flag, which has been turned on by default to prevent parsing of the alignment format. yeah, it's locked in π
TO USE LAGAN:
my $lagan = Bio::Tools::Run::Alignment::Lagan->new(@params);
my $report_out = $lagan->lagan($seq1, $seq2);
A SimpleAlign object is returned. π
TO USE MLAGAN:
my $lagan = Bio::Tools::Run::Alignment::Lagan->new();
my $tree = "(($seqname1 $seqname2) $seqname3)";
my @sequence_objs; #an array of bioperl Seq objects
##If you use an unblessed seq array
my $seq_ref = \@sequence_objs;
bless $seq_ref, "ARRAY";
my $report_out = $lagan->mlagan($seq_ref, $tree);
A SimpleAlign object is returned π
ngl, only the basic mlagan/lagan functionality has been implemented, because their project is doing the iterative development thing. Future maintenance upgrades will include enhanced features and scoring β the glow-up is coming bestie π
π«Ά 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. fr fr, they want to hear from you π
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - 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. (yes, include the code, do not gatekeep the details, the experts ate with that one π₯)
π 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:
http://redmine.open-bio.org/projects/bioperl/
π AUTHOR - Stephen Montgomery π
Email smontgom@bcgsc.bc.ca
Genome Sciences Centre in beautiful Vancouver, British Columbia CANADA πβ¨
π CONTRIBUTORS π
MLagan/Lagan is the hard work of Michael Brudno et al. β absolute icons, no cap π
Sendu Bala bix@sendu.me.uk
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (so if it starts with an underscore, that's your sign to not touch it bestie π)
𧬠lagan
Runs the Lagan pairwise alignment algorithm Inputs should be two PrimarySeq objects.
Returns an SimpleAlign object / preloaded with the tmp file of the Lagan multifasta output.
𧬠mlagan
Runs the Mlagan multiple sequence alignment algorithm. Inputs should be an Array of Primary Seq objects and a Phylogenetic Tree in String format or as a Bio::Tree::TreeI compliant object. Returns an SimpleAlign object / preloaded with the tmp file of the Mlagan multifasta output.
π’ nuc_matrix
Title : nuc_matrix
Usage : my $matrix_obj = $obj->nuc_matrix();
-or-
$obj->nuc_matrix($matrix_obj);
-or-
$obj->nuc_matrix($matrix_file);
Function: Get/set the substitution matrix for use by mlagan. By default the
file $LAGAN_DIR/nucmatrix.txt is used by mlagan. By default this
method returns a corresponding Matrix.
Returns : Bio::Matrix::Mlagan object
Args : none to get, OR to set:
Bio::Matrix::MLagan object
OR
filename of an mlagan substitution matrix file
NB: due to a bug in mlagan 2.0, the -nucmatrixfile option does not
work, so this Bioperl wrapper is unable to simply point mlagan to
your desired matrix file (or to a temp file generated from your
matrix object). Instead the $LAGAN_DIR/nucmatrix.txt file must
actually be replaced. This wrapper will make a back-up copy of that
file, write the new file in its place, then revert things back to the
way they were after the alignment has been produced. For this reason,
$LAGAN_DIR must be writable, as must $LAGAN_DIR/nucmatrix.txt.
okay so heads up on that NB: there's a bug inmlagan2.0 where the-nucmatrixfileoption straight up does not work π so this wrapper cannot just pointmlaganat your matrix file (or a temp file made from your matrix object). Instead the$LAGAN_DIR/nucmatrix.txtfile has to be actually replaced. The wrapper makes a back-up copy of that file, writes the new file in its place, then reverts everything back after the alignment is produced. Which means$LAGAN_DIRmust be writable, and so must$LAGAN_DIR/nucmatrix.txt. not optional, bestie, it's giving mandatory π
π οΈ _setinput
Title : _setinput
Usage : Internal function, not to be called directly
Function: Create input file(s) for Lagan executables
Returns : name of files containing Lagan data input /
or array of files and phylo tree for Mlagan data input
π οΈ _generic_lagan
Title : _generic_lagan
Usage : internal function not called directly
Returns : SimpleAlign object
π οΈ _setparams
Title : _setparams
Usage : Internal function, not to be called directly
Function: Create parameter inputs for (m)Lagan program
Returns : parameter string to be passed to Lagan
Args : Reference to calling object and name of (m)Lagan executable
π οΈ _runlagan
Title : _runlagan
Usage : Internal function, not to be called directly
Function: makes actual system call to (m)Lagan program
Example :
Returns : Report object in the SimpleAlign object
π οΈ executable
Title : executable
Usage : my $exe = $lagan->executable('mlagan');
Function: Finds the full path to the 'lagan' executable
Returns : string representing the full path to the exe
Args : [optional] name of executable to set path to
[optional] boolean flag whether or not warn when exe is not found
Thanks to Jason Stajich for providing the framework for this subroutine
π οΈ program_path
Title : program_path
Usage : my $path = $lagan->program_path();
Function: Builds path for executable
Returns : string representing the full path to the exe
Thanks to Jason Stajich for providing the framework for this subroutine
π οΈ program_dir
Title : program_dir
Usage : my $dir = $lagan->program_dir();
Function: Abstract get method for dir of program. To be implemented
by wrapper.
Returns : string representing program directory
Thanks to Jason Stajich for providing the framework for this subroutine
π οΈ version
Title : version
Usage : my $version = $lagan->version;
Function: returns the program version
Returns : number
Args : none
and that's the whole page bestie π this one's from perl v5.36.0, dated 2023-01-22, and it's part of the User Contributed Perl Documentation for Bio::T...::Lagan(3pm) β slay, go align something π¦πβ¨
π¦ where this page comes from
- debian bookworm: libbio-perl-run-perl 1.7.3-9 Β· Perl
- ubuntu noble: libbio-perl-run-perl 1.7.3-9 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms