Bio-NEXUS
view release on metacpan or search on metacpan
README_admin view on Meta::CPAN
perl Makefile.PL
make disttest
2. Once you are sure that the package works, change the master version number
in lib/Bio/NEXUS.pm (grep on VERSION). This will change the dist name when
the package is built (but the cvs version has to be changed separately-- see #4).
The initial version was based on the percent completion of NEXUS commands,
starting with 0.66 on 8/22/06. Subsequently we just incremented the minor number
by 1 each time. If you don't change this, you won't get a new version number to
upload to CPAN.
3. Check everything into CVS so that you can tag the current versions. If you
just changed the master version number in lib/Bio/NEXUS.pm, then check that in.
4. Tag your outgoing distribution with the master number:
cvs tag release_xx_xx
where xx_xx is something like 0_66 etc.
5. Build the package
perl Makefile.PL
make dist
6. upload the package on CPAN.
https://pause.perl.org/pause/
SOURCES
Here are some things to read about how to make a Perl package.
http://www.perlfoundation.org/perl5/index.cgi?cpan_packaging
doc/UserManual.pod view on Meta::CPAN
"NEXUS Perl Library".
Along with the library modules in Bio::NEXUS, the Bio::NEXUS package described here
includes documentation as well as two demonstration applications,
B<nexplot.pl> and B<nextool.pl>. The Bio::NEXUS library is the middle
layer of the L<http://www.molevol.org/nexplorer> Nexplorer server,
which provides a graphical interface for browsing and manipulating sequence
family data, showcasing the methods in Bio::NEXUS. The graphical rendering
framework used in Nexplorer is the same as that used in nexplot.pl.
A beta version of the package was released in 2004. As of 2006, we are
uploading the package to CPAN.
In terms of the big picture, what is currently missing from this project is
data IO from other formats and streams. Our future plans include integrating
more fully with BioPerl and with the CIPRES services architecture, to provide
access to other file formats commonly used in bioinformatics, as well as to
online services and databases.
=head1 Chapter 2. NEXUS, Bio::NEXUS, and the Character-State Data Model
=head2 2.1. The Character-State Data Model
lib/Bio/NEXUS/Tools/NexPlotter.pm view on Meta::CPAN
use DBI;
my ($my_data , $taxlabels) = @_;
my $dbh = DBI->connect("dbi:mysql:taxonomy", "root", "") || die "Can't connect to taxonomy: $DBI::errstr";
my $dir_param = $runtime_options->{'directory_param'};
my $table_name = ($dir_param eq 'pandit') ? 'sptr_taxa' : 'cds';
my $field_name = ($dir_param eq 'pandit') ? 'sptr_id' : 'prot_id';
my $search_cond=($dir_param eq 'pandit') ? "= ?" : "like ?";
my $sql_statement;
if($dir_param eq 'uploads') {
$sql_statement=qq{
SELECT kingdom,name
from taxon_name
where name_class='scientific name' and
taxon_id= ? limit 10};
}else {
$sql_statement=qq{
SELECT kingdom,name
from $table_name,taxon_name
where $table_name.taxon_id=taxon_name.taxon_id and
lib/Bio/NEXUS/Tools/NexPlotter.pm view on Meta::CPAN
my $kingdom = {
vertebrata => lc $runtime_options->{'kingdom'}->{'vertebrate'},
invertebrata => lc $runtime_options->{'kingdom'}->{'invertebrate'},
plants => lc $runtime_options->{'kingdom'}->{'plant'},
fungi => lc $runtime_options->{'kingdom'}->{'fungi'},
protist => lc $runtime_options->{'kingdom'}->{'protist'}
};
for my $taxlabel (@$taxlabels) {
my $taxlabel_tmp=(split(/\//,$taxlabel))[0];
(my $id=$taxlabel_tmp)=~s/^.*_//g;
if ($dir_param eq 'uploads') {
## some conditions
}else {
chop($id) if ($dir_param eq 'NEXUS' or $dir_param eq 'uploads');
chop($id) if ($dir_param eq 'NEXUS' or $dir_param eq 'uploads');
$id = ($dir_param eq 'pandit') ? $id : "$id%";
}
my $sth = $dbh->prepare($sql_statement) || die "Can't prepare statement: $DBI::errstr";
my $rc = $sth->execute($id) || die "Can't execute statement: $DBI::errstr";
my $num_of_rows = $sth->rows;
my $matrix_ref = $sth->fetchall_arrayref;
for (my $rowNo = 0;$rowNo < $num_of_rows;$rowNo++) {
$my_data->set_node_color($taxlabel,$kingdom->{$$matrix_ref[0][$rowNo]});
}
}
( run in 0.934 second using v1.01-cache-2.11-cpan-b16cb0d3907 )