[Bioperl-l] Representation of phylogenetic trees
David Messina
dmessina@humgen.wustl.edu
Tue, 17 Dec 2002 12:14:29 -0600
Hi all,
Jutta's email reminded me of something I wanted to say per the
discussion on easing the learning curve for newbies.
If you don't know the attributes of an object, then knowing the methods
to manipulate the attributes in the object gets you only halfway to
what you want to do.
For example: Recently, I used SeqIO to create a Seq object from a
Genbank record. I know Genbank records include the gi for the record,
and I figured that SeqIO parses the gi and stores it somewhere in the
Seq object, but I have no idea where -- $seqobj->gi() doesn't work. I
went to the documentation. I read bptutorial, Bio::Seq, Bio::SeqIO, and
Bio::SeqIO::Genbank, and none of them told me how to access the gi in
my seqobj.
Finally, I ended up reading over the code of the Bio/SeqIO/genbank.pm
module to figure out where it stores the gi when it parses the Genbank
record. As it turns out, it was in $seqobj->primary_id(). Now,
primary_id() is mentioned in both Bio::Seq and bptutorial, but neither
of them indicate that the gi is there. I assume that's because
primary_id() isn't always the gi.
So, along the lines of what Jutta was saying, it would be very helpful
to know what the attributes of an object are in addition to the methods
to manipulate them. If there is an easy way to do this that I have
missed, it would be great if that were prominent in the documentation.
Otherwise, perhaps we could have a list of the attributes that the
object has in the documentation describing the object.
Thanks for listening,
Dave
David Messina
Division of Human Genetics
Washington Univ. in St. Louis
dmessina@genetics.wustl.edu
314/747-1063 fx 314/747-2489