[Bioperl-l] GFF mysql adapter schema problem
Lincoln Stein
lstein at cshl.edu
Fri May 28 17:51:37 EDT 2004
I put in the constraint thinking that if you have multiple features
that occupy the same locations and are of the same method and source,
then this is probably a bug due to loading the same feature file
twice.
Shouldn't you be giving these redundant features different sources or
methods?
Lincoln
On Friday 28 May 2004 04:32 pm, Dmitri Bichko wrote:
> Hello all,
>
> What is the reason for the (fref,fbin,fstart,fstop,ftypeid,gid)
> index on fdata being unique?
>
> I need to display groups with many features with identical
> locations (but different labels). To get this to work I took off
> the unique constraint and fixed the resulting problem with getting
> the last fid for the attribute inserts. The changes are below.
>
> Am I likely to run into other problems because of this change?
> Does anyone know the original reason for this constraint?
>
> Thanks,
> Dmitri
>
> Changes to Bio::DB::GFF::Adaptor::dbi::mysql
>
> 473c473
> < unique index(fref,fbin,fstart,fstop,ftypeid,gid),
> ---
>
> > index(fref,fbin,fstart,fstop,ftypeid,gid),
>
> 623a624
>
> > my $last_insert_id = $dbh->prepare_delayed('SELECT
>
> LAST_INSERT_ID()');
> 641a643
>
> > $self->{load_stuff}{sth}{last_insert_id} = $last_insert_id;
>
> 695,698c697,700
> <
> < my $fid = $dbh->{mysql_insertid}
> < ||
> $self->get_feature_id($gff->{ref},$gff->{start},$gff->{stop},$typei
>d,$gr oupid);
> <
> ---
>
> > $s->{sth}{last_insert_id}->execute
> > or warn $s->{sth}{last_insert_id}->errstr;
> > my ($fid) = $s->{sth}{last_insert_id}->fetchrow_array;
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
More information about the Bioperl-l
mailing list