[Bioperl-l]
Some comments on the Tool::Run::Pylo/Phylip module cluster
Babenko, Vladimir
babenko at ncbi.nlm.nih.gov
Thu Apr 3 11:58:33 EST 2003
Greetings,
First, thanks Jason, Shawn, others for this pakage to exist, it was
really helpful.
As I spent some time adjusting the pipeline
MSA->Boot->ProtDIST->Neigbor->Consense,
I'd like to comment some code fragments I modified:
1) I unlink all 'infile' in working dir before running any wrapper;
2) I rewrote the consense.pm _set_names_from_tree, so now it looks like:
sub _set_names_from_tree {
my ($self,$tree) = @_;
my %names=(); my $i=0;
foreach my $node ($tree->get_nodes)
{
if ($node->is_Leaf)
{
$i++;
$names{$node->id}=$i;
}
}
$self->names(\%names);
return;
}
The reason for modification was that names could contain some not-word
symbols, etc. Also, there was strange skip of some names due to the
reasons I didn't assess.
3) I added the portion in if condition in _setparams sub in Neighbor.pm,
Consense.pm , so the digital fasta headers, smth like 7398875 could be
treated as names:
}
elsif($attr =~ /OUTGROUP/i){
if ($type ne "UPGMA"){
#!! edition
if(($value !~/^\d+$/)||($self->names->{$value}))
{ # is a name so find the rank
4) I didn't find out how I could set the temp dir officially, so I
hacked the wrapperbase.pm tempdir method
( reason is I'm quite a diletant in unix shell setups, so my TEMP env
variable setup didn't want to change :-)), also I needed the absolute
path to temp)
Hope this makes sense,
Vladimir
More information about the Bioperl-l
mailing list