[Bioperl-l] Trying to get a mysql DB from genbank flat files

Raphael LaFrance rafe@scinq.org
Tue, 27 Nov 2001 12:08:24 -0500


Just as a heads-up... you're going to have to do it to most other string
fields too.  I found this to be an endemic problem in most of the long
string fields in the genbank files (feature description & keywords,
references, comments, etc. etc.)

rafe

Heikki Lehvaslaiho wrote:
> 
> Elia Stupka wrote:
> >
> > > quote
> > > $sql = $dbh->quote($string);
> > > This method escapes special characters (quotation marks, etc.) from strings
> > > and adds the required outer quotation marks. May not be able to handle all
> > > types of input (i.e binary data).
> >
> > Excellent, thank you guys for all the suggestions!
> >
> > Elia
> 
> I ran into this same problem today trying to use bioperl-db.
> An immunoglobulin sequence entry (D87009) has ' characters in keywords...
> 
> I think I came up with a clean solution to this. I added quote() as a
> shortcut into Bio::DB::SQL::BaseAdaptor and added line
>         $kw = $self->quote($kw);
> into Bio::DB::SeqAdaptor.
> 
> I did the same for the description lines because I know that they sometimes
> contain "prime" and other funny characters.
> 
>         -Heikki
> 
> --
> ______ _/      _/_____________________________________________________
>       _/      _/                      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