Bio::Emboss - Write EMBOSS programs in Perl
use Bio::Emboss qw(:all); embInitPerl("seqret", \@ARGV); $seqall = ajAcdGetSeqall("sequence"); $seqout = ajAcdGetSeqoutall("outseq"); while ($seqall->ajSeqallNext($seq)) { $seqout->ajSeqAllWrite ($seq); }
This module allows Perl programmers to access functions of the EMBOSS (European Molecular Biology Open Software Suite) package.
You can use this module in an object oriented way or not. I.e. the EMBOSS function
AjBool ajSeqallNext (AjPSeqall seqall, AjPSeq* retseq);
can be used from Perl in the following ways:
$ok = $seqall->ajSeqallNext ($retseq);
or
$ok = Bio::Emboss::ajSeqallNext ($seqall, $retseq);
# --- with use Bio::Emboss ":all" $ok = ajSeqallNext ($seqall, $retseq);
AjPxxx types are translated into Perl references, blessed into the package Bio::Emboss::xxx. This allows the object oriented notation seen above.
AjPxxx
Bio::Emboss::xxx
Functions expecting pointers to variables, because the function changes the value of this variable don't need pointers/references from Perl. I.e.
(AjPSeqall seqall, AjPSeq* retseq);
translates to
($seqall, $retseq)
Known problem: Some C prototypes are ambiguous for Perl: (int*) can mean a pointer to an integer value (because the functions changes the value), OR it can be an array of integers. Depending on the meaning a different translation into Perl needs to be done.
(In PerlXS, in the first case "&" instead of "*" is used for the prototype of the function. In the second case, the "&" must not be used. See "The & Unary Operator" in perlxs)
Because Perl provides the command-line in $0 and @ARGV (and not argc and argv like in C), two convenience functions have been implemented to start an EMBOSS application from Perl.
$0
@ARGV
argc
argv
Can be used instead of embInit(char *pgm, ajint argc, char *argv[])
embInit(char *pgm, ajint argc, char *argv[])
Can be used instead of ajGraphInit(char *pgm, ajint argc, char *argv[])
ajGraphInit(char *pgm, ajint argc, char *argv[])
None by default.
Available export tags are:
With this export tag, all available functions in this module are copied into the callers namespace.
Export ajAcdGet... functions only.
ajAcdGet...
http://emboss.sourceforge.net/
perldoc Bio::Emboss::Ajax (if installed)
Examples in the t/ subdirectory of the Bio::Emboss source tree.
Peter Ernst, <pernst@cpan.org>
Copyright 2003-2006 by Peter Ernst
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Bio::Emboss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Emboss
CPAN shell
perl -MCPAN -e shell install Bio::Emboss
For more information on module installation, please visit the detailed CPAN module installation guide.