Jump to content




Recent Status Updates

  • Photo
      30 Sep
    rhossis

    laptop hard disk seated beneath motherboard but with no access panel. 7 hours to replace :(

    Show comments (3)
  • Photo
      19 Sep
    Chall

    I love it when you go to write a help thread, then while writing, you reach an enlightenment, and figure it out yourself.

    Show comments (3)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

Phylogenetic tree construction using perl


This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1 rsingh2083

rsingh2083

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 25 September 2012 - 08:12 AM

Hi all, Im a bioinformatician at a research centre.So I am trying to build a supertree using the algorithm "TreeConstruct" described in section 7.2.3 of this article - http://citeseerx.ist...p=rep1&type=pdf

I have managed to write a code to read the triplets and display the connections (ignoring redundancy)

use strict;
use warnings;

@ARGV = ('a,b|c', 'c,d|e', 'a,d|e') unless @ARGV;

my %HoA;
foreach ( @ARGV ) {
m/^([a-z])[,]([a-z])[|]([a-z])$/ ;
push @{$HoA{$1}}, $2;
}
print "\n===========\@HoA=====\n";
print "from->to\n";
while (my ($key, $values) = each %HoA) {
print $key, "=> [", join(',', @$values), "]\n";
}


#[vanilla@localhost perl]$ perl input.pl

#===========@HoA=====
#from->to
#c=> [d]
#a=> [b,d]

But Im not able to proceed beyond this point. Especially the second and third step of the algorithm are very difficult for me to implement. Please help

#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,397 posts

Posted 11 December 2012 - 08:37 PM

BioPerl is the solution for you. It has your algorithm already developed, and many other functions for the biogenetics field.
Bio:Perl