About Feature_id

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

About Feature_id

Jieyu Wang
Dear colleges,
I have a question about the feature_id. Every time, when we load gff
file to CHADO, it would be assigned a feature_id starting from the
existed feature_id+1 (even the existed feature has been deleted).
I wonder how can I make the feature_id start from 1 but not  from a
very large number.

I understand the adapter.pm should have a function (or module) to
store used feature_id in a record table, but if I already delete all
the features, the record table won't not updated. So the feature_id
for new features still would start from a large number even if it is
the first entry for the CHADO. How can I fix the problem? Which
initialization function should I look at in adapter.pm? Actually, I
didn't find the corresponding code to realize feature_id recording.


Thank you all.
Have a great day,


Joy

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: About Feature_id

Daniel Quest
You could drop the sequences module and reload the tables.  Perhaps do
a data dump.  Problem is collision of ids eventually.

-Daniel

On Tue, Sep 14, 2010 at 3:15 PM, Jieyu Wang <[hidden email]> wrote:

> Dear colleges,
> I have a question about the feature_id. Every time, when we load gff
> file to CHADO, it would be assigned a feature_id starting from the
> existed feature_id+1 (even the existed feature has been deleted).
> I wonder how can I make the feature_id start from 1 but not  from a
> very large number.
>
> I understand the adapter.pm should have a function (or module) to
> store used feature_id in a record table, but if I already delete all
> the features, the record table won't not updated. So the feature_id
> for new features still would start from a large number even if it is
> the first entry for the CHADO. How can I fix the problem? Which
> initialization function should I look at in adapter.pm? Actually, I
> didn't find the corresponding code to realize feature_id recording.
>
>
> Thank you all.
> Have a great day,
>
>
> Joy
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Gmod-schema mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: About Feature_id

Scott Cain
Hi Jieyu and Daniel,

Yes, while you could reset the sequence to 1 in the database, I would
ask why you'd want to?  The feature_id should never be used for
anything outside of the database anyway, so what difference does it
make if a feature_id is 1 or 3456242?

Scott


On Tue, Sep 14, 2010 at 9:51 PM, Daniel Quest <[hidden email]> wrote:

> You could drop the sequences module and reload the tables.  Perhaps do
> a data dump.  Problem is collision of ids eventually.
>
> -Daniel
>
> On Tue, Sep 14, 2010 at 3:15 PM, Jieyu Wang <[hidden email]> wrote:
>> Dear colleges,
>> I have a question about the feature_id. Every time, when we load gff
>> file to CHADO, it would be assigned a feature_id starting from the
>> existed feature_id+1 (even the existed feature has been deleted).
>> I wonder how can I make the feature_id start from 1 but not  from a
>> very large number.
>>
>> I understand the adapter.pm should have a function (or module) to
>> store used feature_id in a record table, but if I already delete all
>> the features, the record table won't not updated. So the feature_id
>> for new features still would start from a large number even if it is
>> the first entry for the CHADO. How can I fix the problem? Which
>> initialization function should I look at in adapter.pm? Actually, I
>> didn't find the corresponding code to realize feature_id recording.
>>
>>
>> Thank you all.
>> Have a great day,
>>
>>
>> Joy
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> Gmod-schema mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Gmod-schema mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: About Feature_id

Jieyu Wang
Dear Dr. Scott,
I think it is easy to read with small numbers and convenient for
testing. For a new file, it is reasonable to start feature_id from 1,
and I will know feature_id=15 would be approximately the 15th feature.
 And I personally think small numbers are pretty.

Thanks.


2010/9/15 Scott Cain <[hidden email]>:

> Hi Jieyu and Daniel,
>
> Yes, while you could reset the sequence to 1 in the database, I would
> ask why you'd want to?  The feature_id should never be used for
> anything outside of the database anyway, so what difference does it
> make if a feature_id is 1 or 3456242?
>
> Scott
>
>
> On Tue, Sep 14, 2010 at 9:51 PM, Daniel Quest <[hidden email]> wrote:
>> You could drop the sequences module and reload the tables.  Perhaps do
>> a data dump.  Problem is collision of ids eventually.
>>
>> -Daniel
>>
>> On Tue, Sep 14, 2010 at 3:15 PM, Jieyu Wang <[hidden email]> wrote:
>>> Dear colleges,
>>> I have a question about the feature_id. Every time, when we load gff
>>> file to CHADO, it would be assigned a feature_id starting from the
>>> existed feature_id+1 (even the existed feature has been deleted).
>>> I wonder how can I make the feature_id start from 1 but not  from a
>>> very large number.
>>>
>>> I understand the adapter.pm should have a function (or module) to
>>> store used feature_id in a record table, but if I already delete all
>>> the features, the record table won't not updated. So the feature_id
>>> for new features still would start from a large number even if it is
>>> the first entry for the CHADO. How can I fix the problem? Which
>>> initialization function should I look at in adapter.pm? Actually, I
>>> didn't find the corresponding code to realize feature_id recording.
>>>
>>>
>>> Thank you all.
>>> Have a great day,
>>>
>>>
>>> Joy
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> Gmod-schema mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>>
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> Gmod-schema mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>
>
>
>
> --
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
>

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema
Reply | Threaded
Open this post in threaded view
|

Re: About Feature_id

Scott Cain
Hi Jieyu,

LOL (small numbers are pretty).  Fair enough.  If you are SURE that
all references to all features are gone from the database, you can
reset the feature_feature_id_seq sequence, which is where feature_ids
come from.  What I would really do though is create a database that is
empty but has your cvterms loaded but no features, and create a
database dump of that.  Then, when you want to blow a way a database,
you can can just drop it and repopulate it with the dump.

Scott

PS: just so you know: when using the GFF bulk loader, the feature_ids
won't start at 1 for annoying reasons; they start around 3 or 4.

On Wed, Sep 15, 2010 at 3:33 PM, Jieyu Wang <[hidden email]> wrote:

> Dear Dr. Scott,
> I think it is easy to read with small numbers and convenient for
> testing. For a new file, it is reasonable to start feature_id from 1,
> and I will know feature_id=15 would be approximately the 15th feature.
>  And I personally think small numbers are pretty.
>
> Thanks.
>
>
> 2010/9/15 Scott Cain <[hidden email]>:
>> Hi Jieyu and Daniel,
>>
>> Yes, while you could reset the sequence to 1 in the database, I would
>> ask why you'd want to?  The feature_id should never be used for
>> anything outside of the database anyway, so what difference does it
>> make if a feature_id is 1 or 3456242?
>>
>> Scott
>>
>>
>> On Tue, Sep 14, 2010 at 9:51 PM, Daniel Quest <[hidden email]> wrote:
>>> You could drop the sequences module and reload the tables.  Perhaps do
>>> a data dump.  Problem is collision of ids eventually.
>>>
>>> -Daniel
>>>
>>> On Tue, Sep 14, 2010 at 3:15 PM, Jieyu Wang <[hidden email]> wrote:
>>>> Dear colleges,
>>>> I have a question about the feature_id. Every time, when we load gff
>>>> file to CHADO, it would be assigned a feature_id starting from the
>>>> existed feature_id+1 (even the existed feature has been deleted).
>>>> I wonder how can I make the feature_id start from 1 but not  from a
>>>> very large number.
>>>>
>>>> I understand the adapter.pm should have a function (or module) to
>>>> store used feature_id in a record table, but if I already delete all
>>>> the features, the record table won't not updated. So the feature_id
>>>> for new features still would start from a large number even if it is
>>>> the first entry for the CHADO. How can I fix the problem? Which
>>>> initialization function should I look at in adapter.pm? Actually, I
>>>> didn't find the corresponding code to realize feature_id recording.
>>>>
>>>>
>>>> Thank you all.
>>>> Have a great day,
>>>>
>>>>
>>>> Joy
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Start uncovering the many advantages of virtual appliances
>>>> and start using them to simplify application deployment and
>>>> accelerate your shift to cloud computing.
>>>> http://p.sf.net/sfu/novell-sfdev2dev
>>>> _______________________________________________
>>>> Gmod-schema mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Start uncovering the many advantages of virtual appliances
>>> and start using them to simplify application deployment and
>>> accelerate your shift to cloud computing.
>>> http://p.sf.net/sfu/novell-sfdev2dev
>>> _______________________________________________
>>> Gmod-schema mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gmod-schema
>>>
>>
>>
>>
>> --
>> ------------------------------------------------------------------------
>> Scott Cain, Ph. D.                                   scott at scottcain dot net
>> GMOD Coordinator (http://gmod.org/)                     216-392-3087
>> Ontario Institute for Cancer Research
>>
>



--
------------------------------------------------------------------------
Scott Cain, Ph. D.                                   scott at scottcain dot net
GMOD Coordinator (http://gmod.org/)                     216-392-3087
Ontario Institute for Cancer Research

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Gmod-schema mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-schema