Why is there no sequence table in my database?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Why is there no sequence table in my database?

Sam Hokin-3
I'm having a little issue with data integrity, and I came across the seemingly odd fact that there is no sequence table in my
database, right out of dbmodel/ant clean build-db. My dbmodel/build/model/genomic_model.xml contains (from core.xml):

<class name="Sequence" is-interface="true">
         <attribute name="md5checksum" type="java.lang.String"/>
         <attribute name="residues" type="org.intermine.objectstore.query.ClobAccess"/>
         <attribute name="length" type="int"/>
</class>

Yet, I find that every class in genomic_model.xml corresponds to a table in the database EXCEPT sequence. There is no sequence
table. And I'm very confused by what a value like gene.sequenceid=4191841 points to. You know, since there is no sequence table.

That value is created by the transfer-sequences post-processor. The storeNewSequence method sure looks like it's supposed to write
to the sequence table:

private void storeNewSequence(SequenceFeature feature, ClobAccess sequenceString) throws ObjectStoreException {
         Sequence sequence = (Sequence) DynamicUtil.createObject(Collections.singleton(Sequence.class));
         sequence.setResidues(sequenceString);
         sequence.setLength(sequenceString.length());
         osw.store(sequence);
         feature.proxySequence(new ProxyReference(osw.getObjectStore(), sequence.getId(), Sequence.class));
         feature.setLength(new Integer(sequenceString.length()));
         osw.store(feature);
}

Wouldn't osw.store(sequence) write to the sequence table? If it existed? Is this a bug? I thought every class in genomic_model.xml
creates a table of the same (lower-case) name in the production database.

I'm running the current origin/dev version from github:

commit 1429fb96d8f630f1097d8b46809a67e0cbe56c22
Merge: 2707008 ef1c2ee
Author: Julie Sullivan <[hidden email]>
Date:   Tue Apr 26 14:07:28 2016 +0100
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why is there no sequence table in my database?

joe carlson
‘sequence’ is a SQL keyword. look for the intermine_sequence table.

> On May 4, 2016, at 12:01 PM, Sam Hokin <[hidden email]> wrote:
>
> I'm having a little issue with data integrity, and I came across the seemingly odd fact that there is no sequence table in my database, right out of dbmodel/ant clean build-db. My dbmodel/build/model/genomic_model.xml contains (from core.xml):
>
> <class name="Sequence" is-interface="true">
>        <attribute name="md5checksum" type="java.lang.String"/>
>        <attribute name="residues" type="org.intermine.objectstore.query.ClobAccess"/>
>        <attribute name="length" type="int"/>
> </class>
>
> Yet, I find that every class in genomic_model.xml corresponds to a table in the database EXCEPT sequence. There is no sequence table. And I'm very confused by what a value like gene.sequenceid=4191841 points to. You know, since there is no sequence table.
>
> That value is created by the transfer-sequences post-processor. The storeNewSequence method sure looks like it's supposed to write to the sequence table:
>
> private void storeNewSequence(SequenceFeature feature, ClobAccess sequenceString) throws ObjectStoreException {
>        Sequence sequence = (Sequence) DynamicUtil.createObject(Collections.singleton(Sequence.class));
>        sequence.setResidues(sequenceString);
>        sequence.setLength(sequenceString.length());
>        osw.store(sequence);
>        feature.proxySequence(new ProxyReference(osw.getObjectStore(), sequence.getId(), Sequence.class));
>        feature.setLength(new Integer(sequenceString.length()));
>        osw.store(feature);
> }
>
> Wouldn't osw.store(sequence) write to the sequence table? If it existed? Is this a bug? I thought every class in genomic_model.xml creates a table of the same (lower-case) name in the production database.
>
> I'm running the current origin/dev version from github:
>
> commit 1429fb96d8f630f1097d8b46809a67e0cbe56c22
> Merge: 2707008 ef1c2ee
> Author: Julie Sullivan <[hidden email]>
> Date:   Tue Apr 26 14:07:28 2016 +0100
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why is there no sequence table in my database?

Sam Hokin-3
Oh, geez. And all that typing! Thanks, Joe. :)

On 05/04/2016 01:04 PM, Joe Carlson wrote:
> ‘sequence’ is a SQL keyword. look for the intermine_sequence table.
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Why is there no sequence table in my database?

joe carlson
Also, SQL keywords in column names have intermine_ prefixes. Like min and max in the location table.


> On May 4, 2016, at 12:12 PM, Sam Hokin <[hidden email]> wrote:
>
> Oh, geez. And all that typing! Thanks, Joe. :)
>
> On 05/04/2016 01:04 PM, Joe Carlson wrote:
>> ‘sequence’ is a SQL keyword. look for the intermine_sequence table.
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev