view release on metacpan or search on metacpan
lib/Bio/Tools/Run/Phylo/Phylip/Consense.pm view on Meta::CPAN
package Bio::Tools::Run::Phylo::Phylip::Consense;
use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
@CONSENSE_PARAMS @OTHER_SWITCHES
%OK_FIELD);
use strict;
use Bio::SimpleAlign;
use Bio::TreeIO;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
use IO::String;
use Cwd;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the Consense program. This
# can be done in (at least) 3 ways:
lib/Bio/Tools/Run/Phylo/Phylip/Consense.pm view on Meta::CPAN
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $rooted = 0;
#for case where type is Ml
my $Ml = 0;
my $frac = 0.5;
my %menu = %{$Menu{$self->version}->{'CONSENSE'}};
foreach my $attr ( @CONSENSE_PARAMS) {
$value = $self->$attr();
next unless (defined $value);
if ($attr =~/ROOTED/i){
$rooted = 1;
$param_string .= $menu{'ROOTED'};
}
elsif($attr =~/OUTGROUP/i){
if($rooted == 1){
lib/Bio/Tools/Run/Phylo/Phylip/DrawGram.pm view on Meta::CPAN
# Let the code begin...
package Bio::Tools::Run::Phylo::Phylip::DrawGram;
use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
$FONTFILE @DRAW_PARAMS @OTHER_SWITCHES
%OK_FIELD %DEFAULT);
use strict;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
use Cwd;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the neighbor program. This
# can be done in (at least) 3 ways:
#
# 1. define an environmental variable PHYLIPDIR:
# export PHYLIPDIR=/home/shawnh/PHYLIP/bin
lib/Bio/Tools/Run/Phylo/Phylip/DrawGram.pm view on Meta::CPAN
=cut
sub _setparams {
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $cat = 0;
my ($hmargin,$vmargin);
my %menu = %{$Menu{$self->version}->{'DRAWGRAM'}};
foreach my $attr ( @DRAW_PARAMS) {
$value = $self->$attr();
next unless defined $value;
my @vals;
if( ref($value) ) {
($value,@vals) = @$value;
}
$attr = uc($attr);
if( ! exists $menu{$attr} ) {
$self->warn("unknown parameter $attr, known params are ".
lib/Bio/Tools/Run/Phylo/Phylip/DrawTree.pm view on Meta::CPAN
$FONTFILE @DRAW_PARAMS @OTHER_SWITCHES
%OK_FIELD %DEFAULT);
use strict;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
use Bio::Tools::Run::Phylo::Phylip::Base;
use Cwd;
@ISA = qw( Bio::Tools::Run::Phylo::Phylip::Base );
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
# You will need to enable the neighbor program. This
# can be done in (at least) 3 ways:
#
# 1. define an environmental variable PHYLIPDIR:
# export PHYLIPDIR=/home/shawnh/PHYLIP/bin
#
# 2. include a definition of an environmental variable PHYLIPDIR in
# every script that will use DrawTree.pm.
# $ENV{PHYLIPDIR} = '/home/shawnh/PHYLIP/bin';
lib/Bio/Tools/Run/Phylo/Phylip/DrawTree.pm view on Meta::CPAN
sub _setparams {
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $cat = 0;
my ($hmargin,$vmargin);
my %menu = %{$Menu{$self->version}->{'DRAWTREE'}};
foreach my $attr ( @DRAW_PARAMS) {
$value = $self->$attr();
next unless defined $value;
my @vals;
if( ref($value) ) {
($value,@vals) = @$value;
}
$attr = uc($attr);
if( ! exists $menu{$attr} ) {
$self->warn("unknown parameter $attr, known params are ".
lib/Bio/Tools/Run/Phylo/Phylip/Neighbor.pm view on Meta::CPAN
use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
@NEIGHBOR_PARAMS @OTHER_SWITCHES
%OK_FIELD);
use strict;
use Bio::SimpleAlign;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::Root::Root;
use Bio::Root::IO;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
use Cwd;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the neighbor program. This
# can be done in (at least) 3 ways:
#
lib/Bio/Tools/Run/Phylo/Phylip/Neighbor.pm view on Meta::CPAN
=cut
sub _setparams {
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $type ="";
my $version = $self->version;
my %menu = %{$Menu{$version}->{'NEIGHBOR'}};
foreach my $attr ( @NEIGHBOR_PARAMS) {
$value = $self->$attr();
next unless (defined $value && $value);
if ($attr =~/TYPE/i){
if ($value=~/UPGMA/i){
$type = "UPGMA";
$param_string .= $menu{'TYPE'}{'UPGMA'};
}
}
lib/Bio/Tools/Run/Phylo/Phylip/PhylipConf.pm view on Meta::CPAN
# POD documentation - main docs before the code
=head1 NAME
Bio::Tools::Run::Phylo::Phylip::PhylipConf
=head1 SYNOPSIS
use Bio::Tools::Run::Phylo::Phylip::PhylipConf;
my %menu = %{$Bio::Tools::Run::Phylo::Phylip::PhylipConf::Menu->{$version}->{'PROTDIST'}};
=head1 DESCRIPTION
A configuration for managing menu configuration differences
between version 3.5 and 3.6
=head1 FEEDBACK
=head2 Mailing Lists
lib/Bio/Tools/Run/Phylo/Phylip/PhylipConf.pm view on Meta::CPAN
methods. Internal methods are usually preceded with a _
=cut
#'
package Bio::Tools::Run::Phylo::Phylip::PhylipConf;
use strict;
use Exporter;
use vars qw(@ISA %Menu %FileName $RESOLUTIONX $RESOLUTIONY @EXPORT_OK);
use base 'Exporter';
$RESOLUTIONX = 300;
$RESOLUTIONY = 300;
@EXPORT_OK = qw(%FileName %Menu);
%FileName = (
"3.5"=>{'OUTFILE'=>'outfile',
'TREEFILE'=>'treefile',
'PLOTFILE'=>'plotfile',
},
"3.6"=>{'OUTFILE'=>'outfile',
'TREEFILE'=>'outtree',
'PLOTFILE'=>'plotfile',
},
);
%Menu =
(
"3.5" => {
'PROTDIST' => {
'MODEL' => {
'CAT' =>"P\nP\n",
'KIMURA'=>"P\n",
},
'GENCODE'=> {
'ALLOWED'=>"UMVFY",
'OPTION' =>"C\n",
lib/Bio/Tools/Run/Phylo/Phylip/ProtDist.pm view on Meta::CPAN
package Bio::Tools::Run::Phylo::Phylip::ProtDist;
use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
@PROTDIST_PARAMS @OTHER_SWITCHES
%OK_FIELD);
use strict;
use Bio::SimpleAlign;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
use Bio::Tools::Phylo::Phylip::ProtDist;
use Cwd;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the protdist program. This
# can be done in (at least) 3 ways:
lib/Bio/Tools/Run/Phylo/Phylip/ProtDist.pm view on Meta::CPAN
=cut
sub _setparams {
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $cat = 0;
my %menu = %{$Menu{$self->version}->{'PROTDIST'}};
foreach my $attr ( @PROTDIST_PARAMS) {
$value = $self->$attr();
next unless (defined $value);
if ($attr =~/MODEL/i){
if ($value=~/CAT/i){
$cat = 1;
}
$param_string .= $menu{'MODEL'}{$value};
}
lib/Bio/Tools/Run/Phylo/Phylip/ProtPars.pm view on Meta::CPAN
@PROTPARS_PARAMS @OTHER_SWITCHES
%OK_FIELD);
use strict;
use Bio::SimpleAlign;
use Cwd;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::Root::Root;
use Bio::Root::IO;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the protpars program. This
# can be done in (at least) two ways:
#
# 1. define an environmental variable PHYLIPDIR:
# export PHYLIPDIR=/home/shawnh/PHYLIP/bin
#
# 2. include a definition of an environmental variable CLUSTALDIR in
lib/Bio/Tools/Run/Phylo/Phylip/ProtPars.pm view on Meta::CPAN
Args : name of calling object
=cut
sub _setparams {
my ($attr, $value, $self);
$self = shift;
my $param_string = "";
my %menu = %{$Menu{$self->version}->{'PROTPARS'}};
for $attr ( @PROTPARS_PARAMS) {
$value = $self->$attr();
next unless (defined $value);
if ($attr =~/JUMBLE/i){
my ($seed,$itr) = split(",",$value);
$param_string .=$menu{'JUMBLE'}."$seed\n$itr\n";
}
else {
$param_string .= $menu{uc $attr}."$value\n";
lib/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm view on Meta::CPAN
package Bio::Tools::Run::Phylo::Phylip::SeqBoot;
use vars qw($AUTOLOAD @ISA $PROGRAM $PROGRAMDIR $PROGRAMNAME
@SEQBOOT_PARAMS @OTHER_SWITCHES
%OK_FIELD);
use strict;
use Bio::SimpleAlign;
use Bio::AlignIO;
use Bio::TreeIO;
use Bio::Tools::Run::Phylo::Phylip::Base;
use Bio::Tools::Run::Phylo::Phylip::PhylipConf qw(%Menu);
use Bio::Matrix::PhylipDist;
use Cwd;
# inherit from Phylip::Base which has some methods for dealing with
# Phylip specifics
@ISA = qw(Bio::Tools::Run::Phylo::Phylip::Base);
# You will need to enable the SeqBoot program. This
# can be done in (at least) 3 ways:
lib/Bio/Tools/Run/Phylo/Phylip/SeqBoot.pm view on Meta::CPAN
=cut
sub _setparams {
my ($attr, $value, $self);
#do nothing for now
$self = shift;
my $param_string = "";
my $cat = 0;
my $gene_freq = 0;
my %menu = %{$Menu{$self->version}->{'SEQBOOT'}};
foreach my $attr ( @SEQBOOT_PARAMS) {
$value = $self->$attr();
next unless (defined $value);
if ($attr =~/REPLICATES/i){
if( $value !~ /(\d+(\.\d+)?)/ ) {
$self->warn("Expected a number in $attr\n");
next;
}
$param_string .= $menu{'REPLICATES'}."$value\n";
t/SoapEU-unit.t view on Meta::CPAN
{ 'db' => 1 },
{ 'tool' => 1 },
{ 'email' => 1 }
] } , 'einfo request parameters');
is_deeply( $wsdl->response_parameters('einfo'),
{'eInfoResult' =>
[ {'ERROR' => 1},
{'DbList' => [{'DbName|' => 1 }]},
{'DbInfo' => [
{'DbName' => 1 },
{'MenuName' => 1},
{'Description' => 1},
{'Count' => 1},
{'LastUpdate' => 1},
{'FieldList' => [
{'Field' => [
{'Name' => 1},
{'FullName' => 1},
{'Description' => 1},
{'TermCount' => 1},
{'IsDate' => 1},
{'IsNumerical' => 1},
{'SingleToken' => 1},
{'Hierarchy' => 1},
{'IsHidden' => 1}
]}
]},
{'LinkList' => [
{'Link' => [
{'Name' => 1},
{'Menu' => 1},
{'Description' => 1},
{'DbTo' => 1}
]}
]}
]}
]}, 'einfo response parameters');
is_deeply( $wsdl->request_parameters('egquery'),
{ 'eGqueryRequest' => [
{ 'term' => 1 },
{ 'tool' => 1 },
{ 'email' => 1 }
] } , 'egquery request parameters');
is_deeply( $wsdl->response_parameters('egquery'),
{ 'Result' => [
{ 'Term' => 1 },
{ 'eGQueryResult' => [
{'ERROR' => 1},
{'ResultItem' => [
{'DbName' => 1},
{'MenuName' => 1},
{'Count' => 1},
{'Status' => 1}
]}
]}
]} , 'egquery response parameters');
# ESoap
ok my $dumfac = Bio::DB::ESoap->new( -util => 'run_eLink',
-wsdl_file => test_input_file('eutils.wsdl') ), "dummy ESoap factory";
t/data/eutils.wsdl view on Meta::CPAN
<xs:complexType>
<xs:sequence>
<xs:element name="Term" type="xs:string"/>
<xs:element name="eGQueryResult" type="tns:eGQueryResultType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ResultItemType">
<xs:sequence>
<xs:element name="DbName" type="xs:string"/>
<xs:element name="MenuName" type="xs:string"/>
<xs:element name="Count" type="xs:string"/>
<xs:element name="Status" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="eGQueryResultType">
<xs:sequence>
<xs:element name="ERROR" type="xs:string" minOccurs="0"/>
<xs:element name="ResultItem" type="tns:ResultItemType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
t/data/eutils.wsdl view on Meta::CPAN
</xs:element>
</xs:schema>
<xs:schema targetNamespace="http://www.ncbi.nlm.nih.gov/soap/eutils/einfo" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.ncbi.nlm.nih.gov/soap/eutils/einfo" elementFormDefault="qualified" >
<!-- version="2.0" -->
<!-- http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eInfo_020511.dtd date: 2006-12-04 -->
<xs:complexType name="DbInfoType">
<xs:sequence>
<xs:element name="DbName" type="xs:string"/>
<xs:element name="MenuName" type="xs:string"/>
<xs:element name="Description" type="xs:string"/>
<xs:element name="Count" type="xs:string"/>
<xs:element name="LastUpdate" type="xs:string"/>
<xs:element name="FieldList" type="tns:FieldListType"/>
<xs:element name="LinkList" type="tns:LinkListType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DbListType">
<xs:choice>
<xs:element name="DbName" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
t/data/eutils.wsdl view on Meta::CPAN
</xs:sequence>
</xs:complexType>
<xs:complexType name="FieldListType">
<xs:sequence>
<xs:element name="Field" type="tns:FieldType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LinkType">
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Menu" type="xs:string"/>
<xs:element name="Description" type="xs:string"/>
<xs:element name="DbTo" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LinkListType">
<xs:sequence>
<xs:element name="Link" type="tns:LinkType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
t/data/eutils.wsdl view on Meta::CPAN
<xs:complexType name="LinkType">
<xs:sequence>
<xs:element name="Id" type="tns:IdType"/>
<xs:element ref="tns:Score" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LinkInfoType">
<xs:sequence>
<xs:element ref="tns:DbTo"/>
<xs:element ref="tns:LinkName"/>
<xs:element ref="tns:MenuTag" minOccurs="0"/>
<xs:element ref="tns:HtmlTag" minOccurs="0"/>
<xs:element ref="tns:Url" minOccurs="0"/>
<xs:element ref="tns:Priority"/>
</xs:sequence>
</xs:complexType>
<xs:element name="LinkName" type="xs:string"/>
<!-- TOO complex for Axis2
<xs:complexType name="LinkSetType">
t/data/eutils.wsdl view on Meta::CPAN
<xs:complexType name="LinkSetDbHistoryType">
<xs:sequence>
<xs:element ref="tns:DbTo"/>
<xs:element ref="tns:LinkName"/>
<xs:element ref="tns:QueryKey" minOccurs="0"/>
<xs:element ref="tns:Info" minOccurs="0"/>
<xs:element ref="tns:ERROR" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="MenuTag" type="xs:string"/>
<xs:element name="Name" type="xs:string"/>
<xs:element name="NameAbbr" type="xs:string"/>
<xs:complexType name="ObjUrlType">
<xs:sequence>
<xs:element ref="tns:Url"/>
<xs:element ref="tns:IconUrl" minOccurs="0"/>
<xs:element ref="tns:LinkName" minOccurs="0"/>
<xs:element ref="tns:SubjectType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="tns:Category" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="tns:Attribute" minOccurs="0" maxOccurs="unbounded"/>