Recent Topics
-
DATA STRUCTURE AND ALGORITHM in C++FirdausTaufik - Today, 07:34 PM
-
Purged Wars (Browser based game)Cerrivess - Today, 07:20 PM
-
What can't Tomcat do? J2EEPally - Today, 07:16 PM
-
My code dose not work....:q - constructor and list in classLadyYeon - Today, 07:08 PM
-
You ever read this book?Jamesx - Today, 04:40 PM
Recent Blog Entries
Recent Status Updates
Popular Tags
- Managed C++
- networking
- c
- stream
- programming
- Visual Basic 4 / 5 / 6
- console
- Connection
- import
- authentication
- element
- syntax
- hardware
- session
- sql
- javascript
- array
- printing
- generator
- game
- header
- html5
- mysql
- string
- c++
- timer
- loop
- java
- html
- ajax
- form
- C#
- jquery
- php
- assembly
- linked list
- vb.net
- xml
- android
- css
- login
- encryption
- setup
- calculator
- combobox
- binary
- pseudocode
- hello world
- innerHTML
- grid
Phylogenetic tree construction using perl
Started by rsingh2083, Sep 25 2012 08:12 AM
1 reply to this topic
#1
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
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














