[Bioperl-l] these objects are pretty cool

Robson Francisco de Souza robfsouza at gmail.com
Sat Mar 22 23:11:49 UTC 2008


Hi John,

The methods usually are designed to provide simple means to access the
object's internal data structure. They are intended to hide the
internal data structure, replacing the need to understand it by a
binding to the documented class methods.

If the documentation does not satisfy you and you still want to take a
look at its data structure, try dumping the object with a code like

use Bio::SeqIO;
use Data::Dumper;
while ( my $seq = $out->next_seq() ) { print Dumper($seq),"\n"; }

and check ou chapters four and five of Programming Perl.
Best,
Robson

PS: watch out for lots of printed output...

2008/3/22, Jason Stajich <jason at bioperl.org>:
> it's got methods that you need to call to get the data.  Did you try
>  looking at any of the howtos - they discuss this sort of thing.
>
>  http://bioperl.org/wiki/HOWTOs
>
>
>  -jason
>
> On Mar 22, 2008, at 10:39 PM, mrphysh at juno.com wrote:
>
>  >
>  > I am starting to understand how to use the objects.
>  >
>  > I am the sort who wants to understand how things work, at least on
>  > some level.  I think my understanding wold be increased with
>  > knowledge of the actual contents of the object.  My book says they
>  > are hashes and that makes sense:  field-value.......field-
>  > value.......field-value
>  >
>  > But as far as I can tell they cannot be taken apart like a regular
>  > hash.
>  >
>  > How can I print out the contents?  this makes sense to me:
>  > xxxxxxxxxxxxxxxx
>  > use Bio::SeqIO;
>  >
>  > #these objects were made for file input...conversion...file output
>  >
>  > while ( my $seq = $out->next_seq() ) {print "$seq\n"; }
>  >
>  > #or..how about this?
>  >
>  > foreach ( my $seqq = $in->next_seq() ) {print "$seqq\n"; }
>  > xxxxxxxxxxxxxx
>  > this gives back:
>  >
>  > Bio::Seq::RichSeq=HASH(0x860dcdc)
>  > Bio::Seq=HASH(0x85f5a20)
>  >
>  > Is there some way to slice up the object and look at the parts?
>  >
>  > John
>  > _____________________________________________________________
>  > Click to get a free auto insurance quotes from top companies.
>  > http://thirdpartyoffers.juno.com/TGL2121/fc/
>  > REAK6aAXgEMUkAKrIEHMi8TYC8kZcjYgq27yjsTkFs54AT2NkhfilW/
>  >
>  >
>  >
>  > _______________________________________________
>  > Bioperl-l mailing list
>  > Bioperl-l at lists.open-bio.org
>  > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>  _______________________________________________
>  Bioperl-l mailing list
>  Bioperl-l at lists.open-bio.org
>  http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list