Laurence Amilhat | 3 Jan 15:29
Picon
Picon
Favicon

BioPerl and NHX tree

Dear all,

I am trying to convert a newick tree into an NHX tree, so I can add the 
taxid tag for each leaf.

I am using the modules: Bio::TreeIO  & Bio::Tree::NodeNHX
The idea is
1) to read the newick tree
2) get the leaf, and get the corresponding taxid for it
3) add the nhx species tag
4) write the nhx tree

I was able to do the first 2 steps, and I could create an object 
node_nhx and add the tag T,
but I don't know how to write an nhx Tree with the node_nhx previously 
created...

Does anyone have an idea? any help are welcome.

Thanks,

laurence.

Here are my code and the samples files for better understanding:
newick2nhx.pl -f test_tree.nwk -o tata -c seq_taxid.txt

_newick2nhx.pl:_
use strict;
use Bio::TreeIO;
use Bio::Tree::NodeNHX;
(Continue reading)

aaron.j.mackey | 3 Jan 16:12
Picon
Favicon

Re: BioPerl and NHX tree

Instead of using TreeIO::newick to read the tree, use TreeIO::nhx -- that 
way, your tree's nodes are already NodeNHX's.  Instead of creating a new 
$nodenhx, you can use the $node variable directly from the tree ...

-Aaron

bioperl-l-bounces <at> lists.open-bio.org wrote on 01/03/2008 09:29:09 AM:

> Dear all,
> 
> I am trying to convert a newick tree into an NHX tree, so I can add the 
> taxid tag for each leaf.
> 
> I am using the modules: Bio::TreeIO  & Bio::Tree::NodeNHX
> The idea is
> 1) to read the newick tree
> 2) get the leaf, and get the corresponding taxid for it
> 3) add the nhx species tag
> 4) write the nhx tree
> 
> I was able to do the first 2 steps, and I could create an object 
> node_nhx and add the tag T,
> but I don't know how to write an nhx Tree with the node_nhx previously 
> created...
> 
> Does anyone have an idea? any help are welcome.
> 
> Thanks,
> 
> laurence.
(Continue reading)

Laurence Amilhat | 4 Jan 09:33
Picon
Picon
Favicon

Re: BioPerl and NHX tree

Thank you Aaron,

it's working now. I've changed to species instead of taxid, so I can 
color the species on my tree using the ATV viewer.
thanks again,

Regards,

Laurence.

aaron.j.mackey <at> gsk.com a écrit :
> Instead of using TreeIO::newick to read the tree, use TreeIO::nhx -- that 
> way, your tree's nodes are already NodeNHX's.  Instead of creating a new 
> $nodenhx, you can use the $node variable directly from the tree ...
>
> -Aaron
>
> bioperl-l-bounces <at> lists.open-bio.org wrote on 01/03/2008 09:29:09 AM:
>
>   
>> Dear all,
>>
>> I am trying to convert a newick tree into an NHX tree, so I can add the 
>> taxid tag for each leaf.
>>
>> I am using the modules: Bio::TreeIO  & Bio::Tree::NodeNHX
>> The idea is
>> 1) to read the newick tree
>> 2) get the leaf, and get the corresponding taxid for it
>> 3) add the nhx species tag
(Continue reading)

Hilmar Lapp | 7 Jan 04:02
Picon
Gravatar

Re: How to retrieve a persistent object by bioperl-db?

Hi Zhihua, you didn't ever respond to Marc's link to the Persistent  
Bioperl slides - did that help?

	-hilmar

On Dec 6, 2007, at 11:25 PM, zhihuali wrote:

>
> Hi netters,
>
> I've installed BioSQL and bioperl-db, and successfully created and  
> stored a persistent object:
>
> use strict;use warnings;use Bio::Seq;use Bio::DB::BioDB;
> my $dbadp=Bio::DB::BioDB->new(- 
> database=>'biosql',                             - 
> user=>'annoymous',                             -dbname=>'bioseqdb');
>
> my $seqobj=Bio::Seq->new(- 
> accession_number=>"test",                      - 
> id=>"test1",                      - 
> seq=>"AGCTAGCT",                      -version=>1);my $dbobj=$dbadp- 
> >create_persistent($seqobj);$dbobj->create;$dbobj->commit;
>
> It's successful because I found corresponding rows in the bioseqdb  
> tables.
>
> Now I want to retrieve the object back from the database. There's  
> not much documents available and I've tried find_by_unique_key/ 
> primary_key but all failed. Maybe I didn't use them correctly.  
(Continue reading)

Scott Cain | 7 Jan 18:24
Picon

Anything up with cvs/svn?

Hello,

I was trying to get bioperl-live this morning from either cvs or svn and
failed.  I was wondering if something was going on with the server.

Here are the things I tried:

  cvs -d:ext:scain <at> dev.open-bio.org:/home/repository/bioperl co bioperl-live

which resulted in this:

cvs checkout: warning: cannot write to history file /home/repository/bioperl/CVSROOT/history:
Permission denied
cvs checkout: Updating bioperl-live
cvs checkout: failed to create lock directory for `/home/repository/bioperl/bioperl-live'
(/home/repository/bioperl/bioperl-live/#cvs.lock): Permission denied
cvs checkout: failed to obtain dir lock in repository `/home/repository/bioperl/bioperl-live'
cvs [checkout aborted]: read lock failed - giving up

Then I thought I'd try the suggested svn checkout method from the
bioperl wiki:

  svn co svn+ssh://scain <at> dev.open-bio.org/home/hartzell/bioperl/bioperl-live

which resulted in

svn: No repository found in 'svn+ssh://scain <at> dev.open-bio.org/home/hartzell/bioperl/bioperl-live'

Finally, I after looking at the openbio server, I thought I'd try this:

(Continue reading)

Hilmar Lapp | 7 Jan 18:36
Picon
Gravatar

Re: Anything up with cvs/svn?

I think we are still migrating to svn. It's probably better to wait  
for the announcement that everything is ready to go. (And then cvs  
won't work anymore except for anonymous checkout - which should  
actually continue to work while this is in progress. Have you tried  
that?)

	-hilmar

On Jan 7, 2008, at 12:24 PM, Scott Cain wrote:

> Hello,
>
> I was trying to get bioperl-live this morning from either cvs or  
> svn and
> failed.  I was wondering if something was going on with the server.
>
> Here are the things I tried:
>
>   cvs -d:ext:scain <at> dev.open-bio.org:/home/repository/bioperl co  
> bioperl-live
>
> which resulted in this:
>
> cvs checkout: warning: cannot write to history file /home/ 
> repository/bioperl/CVSROOT/history: Permission denied
> cvs checkout: Updating bioperl-live
> cvs checkout: failed to create lock directory for `/home/repository/ 
> bioperl/bioperl-live' (/home/repository/bioperl/bioperl-live/ 
> #cvs.lock): Permission denied
> cvs checkout: failed to obtain dir lock in repository `/home/ 
(Continue reading)

Jason Stajich | 7 Jan 18:43
Gravatar

Re: Anything up with cvs/svn?

CVS r/w is locked because we are transitioning to SVN - you can still  
checkout via anonymous CVS on code.open-bio.org.

The SVN is going to be in /home/svn-repositories/bioperl not George's  
directory, but we are still monkeying around with the directory  
structure.  You can try a checkout but be warned it may change a few  
more times if we add another directory layer in there.

You will get requests for your password at least three times - I  
strongly suggest you use SSH keys to avoid getting prompted each time  
- I don't know why you get asked 3 times as it is a SVN thing I  
assume it is having to make 3 separate requests to do a checkout.

That's what is up for now.  We'll report when the final SVN migration  
is done.

-jason
On Jan 7, 2008, at 9:24 AM, Scott Cain wrote:

> Hello,
>
> I was trying to get bioperl-live this morning from either cvs or  
> svn and
> failed.  I was wondering if something was going on with the server.
>
> Here are the things I tried:
>
>   cvs -d:ext:scain <at> dev.open-bio.org:/home/repository/bioperl co  
> bioperl-live
>
(Continue reading)

Scott Cain | 7 Jan 18:57
Picon

Re: Anything up with cvs/svn?

Hi Hilmar and Jason,

Thanks--for some reason, I thought svn was done.  I'll remain anonymous
for right now (Kind of difficult to do when you announce it publicly :-)

Thanks,
Scott

On Mon, 2008-01-07 at 09:43 -0800, Jason Stajich wrote:
> CVS r/w is locked because we are transitioning to SVN - you can still  
> checkout via anonymous CVS on code.open-bio.org.
> 
> The SVN is going to be in /home/svn-repositories/bioperl not George's  
> directory, but we are still monkeying around with the directory  
> structure.  You can try a checkout but be warned it may change a few  
> more times if we add another directory layer in there.
> 
> You will get requests for your password at least three times - I  
> strongly suggest you use SSH keys to avoid getting prompted each time  
> - I don't know why you get asked 3 times as it is a SVN thing I  
> assume it is having to make 3 separate requests to do a checkout.
> 
> That's what is up for now.  We'll report when the final SVN migration  
> is done.
> 
> -jason
> On Jan 7, 2008, at 9:24 AM, Scott Cain wrote:
> 
> > Hello,
> >
(Continue reading)

Scott Cain | 7 Jan 19:34
Picon

Automatically accepting defaults for `perl Build.PL`

Hello,

I was wanting to implement this myself (and probably still will,
assuming it's not already there...) but I am not a Module::Build guru.
Here's what I'd like to do: add a parameter that I can add when evoking
perl Build.PL so that the default answers will be used when it would
normally ask me a question while running perl Build.PL, something like
this:

  perl Build.PL --yes

Is this sort of thing already built into Module::Build and I can't see
it?  Or can somebody suggest the best way of going about this?

Thanks much,
Scott

--

-- 
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   cain.cshl <at> gmail.com
GMOD Coordinator (http://www.gmod.org/)                     216-392-3087
Cold Spring Harbor Laboratory
Chris Fields | 7 Jan 23:22
Picon

Re: Automatically accepting defaults for `perl Build.PL`

I agree it would be nice.  Not sure how hard it would be to implement;  
maybe it would be best to have a mode of installation, say if one  
wanted 'minimal' (no optional module installation, no scripts),  
'full', 'dev', (assume minimal install but don't test), and so on,  
falling back to the query-based approach if nothing is indicated.

chris

On Jan 7, 2008, at 12:34 PM, Scott Cain wrote:

> Hello,
>
> I was wanting to implement this myself (and probably still will,
> assuming it's not already there...) but I am not a Module::Build guru.
> Here's what I'd like to do: add a parameter that I can add when  
> evoking
> perl Build.PL so that the default answers will be used when it would
> normally ask me a question while running perl Build.PL, something like
> this:
>
>  perl Build.PL --yes
>
> Is this sort of thing already built into Module::Build and I can't see
> it?  Or can somebody suggest the best way of going about this?
>
> Thanks much,
> Scott
>
> -- 
> ------------------------------------------------------------------------
(Continue reading)


Gmane