[Bioperl-l] phylip - ProtDist Problem

Jason Stajich jason at cgt.duhs.duke.edu
Tue Aug 31 08:35:29 EDT 2004


Maybe there is something wrong with how windows is doing things - maybe 
it doesn't accept pipes in the same way that unix does.  You can 
simplify by just writing a little script that does the basics of the 
program execution - perhaps

open(RUN, "| I:\Science\Bioinformatics\PhylipV3.61\exe\protdist.exe") 
|| die ( "cannot open pipe to protdist");

If this fails, don't know what to tell you except get a linux box or 
don't rely on phylip programs - I definitely would prefer that Joe 
would make it accept command-line options rather than this jiggery but 
I know that would be a lot of work.

-jason

On Aug 31, 2004, at 10:24 PM, Nathan Haigh wrote:

> Okay here goes:
>
> $protdist->executable is: 
> I:\Science\Bioinformatics\PhylipV3.61\exe\protdist.exe
> $instring is:
> C:\temp\tJytmRILW9\thukMCrDl3
> Y
>
>
>> -----Original Message-----
>> From: Jason Stajich [mailto:jason at cgt.duhs.duke.edu]
>> Sent: 31 August 2004 13:08
>> To: nathanhaigh at ukonline.co.uk
>> Cc: bioperl
>> Subject: Re: [Bioperl-l] phylip - ProtDist Problem
>>
>> Well for starters what does this print?
>>
>> print $protdist->executable
>>
>>
>> On Aug 31, 2004, at 10:04 PM, Nathan Haigh wrote:
>>
>>> Yes, I have the ENV variable set to 3.6
>>>
>>> I first noticed it not working when using V3.6a3, and thought I'd
>>> install
>>> the latest version 3.61 to see if this fixed the problem - but it
>>> didn't.
>>>
>>> I checked what keystrokes were being piped into ProtDist, and the 
>>> only
>>> the
>>> menu choice was a 'Y' (which should just run the program, and hasn't
>>> changed between version). I ran the program manually and gave it the
>>> filename that had been used by ProtDist.pm and everything worked
>>> correctly!
>>>
>>> I've compared what has been sent to both SeqBoot and ProtDist (in
>>> terms of
>>> menu choices etc) and they seem to have the same syntax etc. However,
>>> as
>>> I've said ProtDist doesn't seem to want to get past the line:
>>>
>>> 	open(PROTDIST,"|".$self->executable);
>>>
>>> Any ideas, why this particular line is causing the problems? Could it
>>> be
>>> something to do with BioPerl or maybe my OS? If you have any thoughts
>>> on
>>> debugging this, I'd like to know!
>>>
>>> Thanks
>>> Nathan
>>>
>>>> -----Original Message-----
>>>> From: Jason Stajich [mailto:jason at cgt.duhs.duke.edu]
>>>> Sent: 31 August 2004 12:48
>>>> To: nathanhaigh at ukonline.co.uk
>>>> Cc: bioperl
>>>> Subject: Re: [Bioperl-l] phylip - ProtDist Problem
>>>>
>>>> Hmm - there are some changes in PHYLIP 3.6 from 3.5 menus, did you
>>>> make
>>>> sure your PHYLIP version environment was set by setting the ENV
>>>> variable otherwise the wrong commands are sent in.
>>>>
>>>> PHYLIPVERSION=3.6
>>>>
>>>> Also you are using 3.6.1 which I know has some bug fixes over 3.6 
>>>> but
>>>> may also have incurred some changes in how the menus act - I don't
>>>> really know though.
>>>>
>>>> I guess either use 3.5 or try debugging the running of 3.6.1 by
>>>> putting
>>>> some print statements in there - see what is being sent in to
> protdist
>>>> and then run protdist by hand to see what are the expected menu 
>>>> items
>>>> to get what you want.  That is how Shawn and I built this in the
> first
>>>> place.
>>>>
>>>> -jason
>>>> On Aug 31, 2004, at 9:26 PM, Nathan Haigh wrote:
>>>>
>>>>> I am trying to run the following script at the bottom which takes a
>>>>> SimpleAlign object and runs SeqBoot on it. I would then like to 
>>>>> take
>>>>> this
>>>>> output and run ProtDist, Neighbor and Consense to produce a
> bootstrap
>>>>> consensus tree. However, ProtDist just seems to fail when it gets 
>>>>> to
>>>>> this
>>>>> line in ProtDist.pm:
>>>>>
>>>>> 	open(PROTDIST,"|".$self->executable);		# line 399 in the
>>>>> latest version of ProtDist.pm from the CVS
>>>>>
>>>>> I am running this on WinXP from within a cgi script and have phylip
>>>>> v3.61. I
>>>>> have no idea why this should fail as the similar line in SeqBoot
>>>>> works
>>>>> fine!
>>>>>
>>>>> Has anyone come across this problem or know why this might be
>>>>> happening!?
>>>>>
>>>>> Regards
>>>>> Nathan
>>>>>
>>>>>
>>>>>
>>>>> # use seqboot to generate bootstrap alignments
>>>>> my @params_seqboot = ('datatype'=>'SEQUENCE', 'replicates'=>100);
>>>>> my $seqboot_factory =
>>>>> Bio::Tools::Run::Phylo::Phylip::SeqBoot->new(@params_seqboot);
>>>>> my $aln_ref = $seqboot_factory->run($aln);
>>>>>
>>>>> # create distance matrices and construct trees using neighbor
>>>>> my $protdist_factory =
>>> Bio::Tools::Run::Phylo::Phylip::ProtDist->new();
>>>>> my $neighbor_factory =
>>> Bio::Tools::Run::Phylo::Phylip::Neighbor->new();
>>>>> my @tree;
>>>>> foreach my $a (@{$aln_ref}) {
>>>>> 	my $matrix = $protdist_factory->run($a);
>>>>> 	push @tree, $neighbor_factory->run($matrix);
>>>>> }
>>>>> # use consense to get a final tree
>>>>> my $consense_factory =
>>> Bio::Tools::Run::Phylo::Phylip::Consense->new();
>>>>> my $tree = $consense_factory->run(\@tree);
>>>>>
>>>>> # output treefile
>>>>> my $outfilename = "outtrees_ur/homologene.nh"; # unrooted tree
>>>>> my $outtree = new Bio::TreeIO('-format' => 'newick',
>>>>> 				'-file'   => ">$outfilename");
>>>>> $outtree->write_tree($tree);
>>>>>
>>>>>
>>>>> ---
>>>>> avast! Antivirus: Outbound message clean.
>>>>> Virus Database (VPS): 0435-2, 28/08/2004
>>>>> Tested on: 31/08/2004 12:26:50
>>>>> avast! is copyright (c) 2000-2003 ALWIL Software.
>>>>> http://www.avast.com
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Bioperl-l mailing list
>>>>> Bioperl-l at portal.open-bio.org
>>>>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>>>>
>>>>>
>>>> --
>>>> Jason Stajich
>>>> Duke University
>>>> jason at cgt.mc.duke.edu
>>>
>>>
>> --
>> Jason Stajich
>> Duke University
>> jason at cgt.mc.duke.edu
>
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20040831/ec3b1681/PGP.bin


More information about the Bioperl-l mailing list