Question: Constucting a Tree using Bioperl
0
gravatar for Andrea
4.3 years ago by
Andrea40
Sweden
Andrea40 wrote:

Constucting a Tree

hi everyone!,

I 'm trying to costruct a tree and get its newick format:

outfile.fasta

>seq9
---KNWEDFEIAAENMYMANPQNCRYTMKYVHSKGHILLKMSDNVKCVQYRAENMPDLKK
-----------------------------------------------
>seq7
----SWEEFVERSVQLFRGDPNATRYVMKYRHCEGKLVLKVTDDRECLKFKTDQAQDAKK
MEKLNNIFF--------------------------------------
>seq8
----SWDEFVDRSVQLFRADPESTRYVMKYRHCDGKLVLKVTDNKECLKFKTDQAQEAKK
MEKLNNIFFTLM-----------------------------------
>seq10
--FDSWDEFVSKSVELFRNHPDTTRYVVKYRHCEGKLVLKVTDNHECLKFKTDQAQDAKK
MEK--------------------------------------------
>seq6
--FTNWEEFAKAAERLHSANPEKCRFVTKYNHTKGELVLKLTDDVVCLQYSTNQLQDVKK
LEKLSSTLLRSI-----------------------------------
>seq5
----SWEEFAKAAEVLYLEDPMKCRMCTKYRHVDHKLVVKLTDNHTVLKYVTDMAQDVKK
IEKLTTLLMR-------------------------------------
>seq4
------EEFSRAVEKLYLTDPMKVRVVLKYRHCDGNLCIKVTDNSVVS-YEMRLFGVQKD
NFALEHSLL--------------------------------------
>seq0
--FQTWEEFSRAAEKLYLADPMKVRVVLKYRHVDGNLCIKVTDDLVCLVYRTDQAQDVKK
IEKF-------------------------------------------
>seq1
-KYRTWEEFTRAAEKLYQADPMKVRVVLKYRHCDGNLCIKVTDDVVCLLYRTDQAQDVKK
IEKFHSQLMRLMELKVTDNKECLKFKTDQAQEAKKMEKLNNIFFTLM
>seq2
EEYQTWEEFARAAEKLYLTDPMKVRVVLKYRHCDGNLCMKVTDDAVCLQYKTDQAQDVKK
VEKLHGK----------------------------------------
>seq3
-MYQVWEEFSRAVEKLYLTDPMKVRVVLKYRHCDGNLCIKVTDNSVCLQYKTDQAQDVK-
-----------------------------------------------

Code

use strict; 
use warnings;

use Bio::AlignIO; 
use Bio::Align::ProteinStatistics; 
use Bio::Tree::DistanceFactory; 
use Bio::TreeIO; 
my $alnio = Bio::AlignIO->new(-file => 'outfile.fasta', -format=>'fasta');
my $dfactory = Bio::Tree::DistanceFactory->new(-method => 'NJ');
my $stats = Bio::Align::ProteinStatistics->new;
my $treeout = Bio::TreeIO->new(-format => 'newick');
while( my $aln = $alnio->next_aln ) 
{
my $mat = $stats->distance(-method => 'Kimura',
                           -align  => $aln);
my $tree = $dfactory->make_tree($mat);
$treeout->write_tree($tree);
}

I Get this message and this output:

UNIVERSAL->import is deprecated and will be removed in a future perl a +t C:/Perl6 4/site/lib/Bio/Tree/TreeFunctionsI.pm line 94. (seq0:0.04012,(seq2:0.06428,(seq4:0.22277,seq3:0.00000):0.14038):0.055 +06,(seq1:0 .08162,((seq9:0.71067,seq6:0.16093):0.24442,(seq5:0.28833,(seq10:0.127 +18,(seq7:0 .06605,seq8:0.08745):0.01099):0.42868):0.01353):0.15249):0.00931);

Is something wrong or what???

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Andrea40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1734 users visited in the last hour