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=>'fast +a'); 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???


In reply to Constucting a Tree using Bioperl by DimitriC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.