[Bioperl-l] Local database building

Heikki Lehvaslaiho heikki@ebi.ac.uk
Mon, 08 Oct 2001 09:16:08 +0100


Jason,

The output Bio::Seq=HASH(0x1eb51ec) is exactly what you'd expect from print
$seq statement (see 'perldoc -f ref'. $seq is a Bio::Seq object. If you want
to see the sequence or other attibutes of the object, you have to call the
corresponding methods. E.g. $seq->seq(), $seq->id().

My favourite way of getting debugging information out of an object is to add
these two lines:

use Data::Dumper;
print Dumper($seq);

	-Heikki


Jason Raymond wrote:
> 
> Aha... I new this should have been familiar.  So this seems like a really
> nice implementation, and for starters I just threw these two scripts from
> the tutorial (one to index, the other to retrieve) at bioperl using a faux
> file to be indexed (the index script is index.pl, the retrieve script is
> fetch.pl):
> 
> >index.pl PEP pep.fas
> 
> [where pep.fas has:
> >123
> AAAAAA
> >124
> ASASAS
> >125
> SSSSSS
> ]
> this created PEP.pag and PEP.dir
> 
> then, after adding a print $seq line to the retrieve script:
> >perl fetch.pl PEP 123
> outputs:
> Bio::Seq=HASH(0x1eb51ec)
> 
> What did I miss?  Also is there a simple way to verify that the index files
> (the .pag and .dir) have been created correctly?
> Thanks for the help :).
> 
> ----- Original Message -----
> From: "Heikki Lehvaslaiho" <heikki@ebi.ac.uk>
> To: "Jason Raymond" <jasonraymond@asu.edu>
> Cc: <bioperl-l@bioperl.org>
> Sent: Friday, October 05, 2001 1:15 AM
> Subject: Re: [Bioperl-l] Local database building
> 
> > Jason,
> >
> > This should be an easy thing.  You can use either Bio::Index::Fasta which
> > uses dbm or you can get bioperl-db from the CVS repository which does the
> > same thing with mySQL as a back end.
> >
> > Try Bio::Index::Fasta first. You'll find an introduction to it in
> > bptutorial.pl section III.1.2.
> >
> > -Heikki
> >
> > Jason Raymond wrote:
> > >
> > > Another newbie question for the group :).  I'm trying to setup a local
> > > database from several sets of Fasta-formatted genomes, and I'm hoping to
> get
> > > a rough step-by-step on how to do this (or where to read more on this).
> > > Most of this data is in the format:
> > >
> > > >orf1@contig16@8@8 35 745 Predicted orf
> > > LDSIFLEF....
> > > >orf3@contig21@8@12 35 431 Predicted orf
> > > MEITAL....
> > > ...
> > >
> > > would this be something that can be 'smoothly' built into a database so
> that
> > > I can later retrieve sequences with Perl scripts?  Also, as of right now
> I
> > > have about 10 different files in this format, and I would ideally like
> them
> > > all to be in one single database.  Is this feasible?
> > > Thanks again!
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l@bioperl.org
> > > http://bioperl.org/mailman/listinfo/bioperl-l
> >
> > --
> > ______ _/      _/_____________________________________________________
> >       _/      _/                      http://www.ebi.ac.uk/mutations/
> >      _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
> >     _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
> >    _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
> >   _/  _/  _/  Cambs. CB10 1SD, United Kingdom
> >      _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
> > ___ _/_/_/_/_/________________________________________________________
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l

-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________