Hi Isabelle, Fabrice,

Apollo was not using <propertyTypeCV> to look up the cv for cvterm
'synonym'.  It was behaving differently than for comments.  After some
thinking, I decided that Apollo should behave the same for synonyms as
comments, so I changed the synonym handling code to also use
<propertyTypeCV> instead of using 'null' and then just defaulting to
whatever 'synonym' cvterm there might be.  This will make behavior more
consistent, although it will break on databases that only have 'synonym'
in the 'null' cv and <propertyTypeCV> is not set to 'null'.

Since this change affects behavior, I'll hold out until Monday to cut a
new release (not good to cut a behavior changing release on a Friday).

Cheers,
Ed

On Fri, 2008-10-03 at 09:27 -0700, Isabelle Phan wrote:
> Bonjour Fabrice,
> 
> it looks like my Chado DB is the same as yours, i.e. 'synonym' belongs to the 
> feature_property cv.
> 
> However, my chado adapter inherits from riceInstance, which has
> 
>         <propertyTypeCV>feature_property</propertyTypeCV>
> 
> already set.
> 
> I've nonetheless tried your suggestion and added that property directly to my 
> <chadodb> configuration, and I am still getting the same error as before. 
> Perhaps I am seeing a different issue than the one you describe? 
> 
> In any case, many thanks for your suggestions,
> 
>  
> Isabelle
> 
> --
> Isabelle Phan, DPhil
> Seattle Biomedical Research Institute
> +1(206)256 7113
> 
> 
> 
> -----Original Message-----
> From: Fabrice Legeai [mailto:[EMAIL PROTECTED]
> Sent: Fri 10/3/2008 12:24 AM
> To: Isabelle Phan
> Cc: Ed Lee; [email protected]; Scott Cain; Gowthaman Ramasamy
> Subject: Re: [apollo] saving to chado DB
>  
> Hi,
> 
> I got the same kind of troubles with comments and author. But everything 
> went great as soon as I modified the chado-adapter.xml.
> 
> I mentionned to extract the property (e.g. synonym, comment, author) 
> from the feature_property cv where they are stored in my database (I 
> think this cv have created when I loaded Chado)..
> 
> So try to figure out what cv the synonym term belong to in your 
> database, and modify the propertyTypeCV of your Chado-adapter like that :
> 
>  <propertyTypeCV>feature_property</propertyTypeCV>
> 
> It might be helpful.
> 
> cheers,
> 
> Fabrice
> 
> Ed Lee wrote:
> > Hi Isabelle,
> >
> > Scott's gut feeling is probably right about Apollo needing the 'synonym'
> > cvterm to belong to a specific cv.  For some reason, Apollo expects it
> > to belong to the 'null' cv (not an empty cv, but a cv called 'null').
> > I'm not sure the historic reason for this decision and I'm guessing your
> > Chado instance has the 'synonym' cvterm that belongs to another cv.
> >
> > Anyway, I've made modifications to the code to try to use the 'null' cv
> > first (as to not break expected behavior) but to fall back to whatever
> > other cv if it's not found.
> >
> > I'll cut a new release of Apollo with this bug fix tomorrow and you can
> > give it a try and let me know how it works.
> >
> > Out of curiosity, could you run the SQL query that Scott mentioned and
> > send the results?
> >
> > Cheers,
> > Ed
> >
> > On Thu, 2008-10-02 at 15:09 -0700, Isabelle Phan wrote:
> >   
> >> forgot to say I am still getting the error upon saving and I am unable
> >> to delete a synonym.
> >>
> >> What can I try next?
> >>
> >> Isabelle
> >>
> >>     
> >>> -----Original Message-----
> >>> From: [EMAIL PROTECTED] 
> >>> [mailto:[EMAIL PROTECTED] On Behalf Of Isabelle Phan
> >>> Sent: Thursday, October 02, 2008 3:04 PM
> >>> To: Scott Cain
> >>> Cc: [email protected]; Gowthaman Ramasamy
> >>> Subject: RE: [apollo] saving to chado DB
> >>>
> >>> I am using
> >>> apollo.dataadapter.chado.jdbc.PostgresChadoAdapter
> >>>
> >>> Isabelle
> >>>
> >>>       
> >>>> -----Original Message-----
> >>>> From: Scott Cain [mailto:[EMAIL PROTECTED] 
> >>>> Sent: Thursday, October 02, 2008 3:01 PM
> >>>> To: Isabelle Phan
> >>>> Cc: Ed Lee; [email protected]; Gowthaman Ramasamy
> >>>> Subject: Re: [apollo] saving to chado DB
> >>>>
> >>>> Hi Isabelle,
> >>>>
> >>>> It could be that these additions are no longer required, 
> >>>>         
> >>> depending on
> >>>       
> >>>> which adapter you are using to talk to Chado (which Ed or I should
> >>>> have asked in the first place).  Honestly, I'm not sure how you tell
> >>>> --but there are two and the older one is what needed much of that
> >>>> "stuff" in the apollo-inserts file.  Most people would probably want
> >>>> to be using the newer one.
> >>>>
> >>>> Scott
> >>>>
> >>>>
> >>>> On Thu, Oct 2, 2008 at 5:51 PM, Isabelle Phan 
> >>>> <[EMAIL PROTECTED]> wrote:
> >>>>         
> >>>>> Hello Ed and Scott,
> >>>>>
> >>>>> first I discovered:
> >>>>> http://gmod.org/wiki/Apollo-Chado
> >>>>>
> >>>>> perhaps this link could be added to the Apollo documentation?
> >>>>>
> >>>>> So I added the cv terms, but apollo-inserts (.sql??) fails:
> >>>>>
> >>>>> ERROR:  null value in column "cv_id" violates not-null constraint
> >>>>>
> >>>>> -> this is caused by bug in SQL statement:
> >>>>> insert into cvterm (name, cv_id, dbxref_id, 
> >>>>>           
> >>>> is_relationshiptype) values
> >>>>         
> >>>>> ('producedby',(select cv_id from cv where name='Relationship
> >>>>> Ontology'),(select dbxref_id from dbxref where accession = 
> >>>>>           
> >>>> 'Relationship
> >>>>         
> >>>>> Ontology:producedby'),1);
> >>>>>
> >>>>> I kind of guess it should be:
> >>>>>
> >>>>> ....select cv_id from cv where name='relationship'...
> >>>>>
> >>>>> NOTICE:  CREATE TABLE will create implicit sequence
> >>>>> "feature_namegenerator_feature_namegenerator_id_seq" for 
> >>>>>           
> >>>> serial column
> >>>>         
> >>>>> "feature_namegenerator.feature_namegenerator_id"
> >>>>> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
> >>>>> "feature_namegenerator_pkey" for table "feature_namegenerator"
> >>>>> CREATE TABLE
> >>>>> INSERT 0 0
> >>>>> INSERT 0 0
> >>>>> ERROR:  aggregates not allowed in WHERE clause
> >>>>>
> >>>>> These statements are invalid:
> >>>>>
> >>>>> INSERT INTO feature_namegenerator (name,type_id,count)
> >>>>> SELECT substr(name, 0 , (position('-' in name))),
> >>>>>      (select cvterm_id from cvterm where cv_id=7 and
> >>>>> name='transcript'),
> >>>>>       to_number(max(substring(name from 21)), '99999')
> >>>>> FROM feature WHERE name like 'RICE%-transcript%' group by name;
> >>>>>
> >>>>> INSERT INTO feature_namegenerator (name,type_id,count)
> >>>>> SELECT substr(name, 0 , (position('-' in name))),
> >>>>>      (select cvterm_id from cvterm where cv_id=14 and 
> >>>>>           
> >>>> name='protein'),
> >>>>         
> >>>>>       to_number(max(substring(name from 19)), '99999')
> >>>>> FROM feature WHERE name like 'RICE%-protein%' group by name;
> >>>>>
> >>>>>
> >>>>> I am not sure what the correct statements should be, 
> >>>>>           
> >>> apart that the
> >>>       
> >>>>> cvterm_id is null and so even if the SQL syntax was 
> >>>>>           
> >>>> correct, the inserts
> >>>>         
> >>>>> would fail.
> >>>>>
> >>>>> any hints?
> >>>>>
> >>>>> Isabelle
> >>>>>
> >>>>>           
> >>>>>> -----Original Message-----
> >>>>>> From: Ed Lee [mailto:[EMAIL PROTECTED]
> >>>>>> Sent: Thursday, October 02, 2008 1:25 PM
> >>>>>> To: Isabelle Phan
> >>>>>> Cc: [email protected]; Gowthaman Ramasamy
> >>>>>> Subject: Re: [apollo] saving to chado DB
> >>>>>>
> >>>>>> Hi Isabelle,
> >>>>>>
> >>>>>> I'll take a look at the mentioned issues.  Unfortunately 
> >>>>>>             
> >>>> SourceForge's
> >>>>         
> >>>>>> CVS is down (again...) so I'll need for it to come back up
> >>>>>> before I can
> >>>>>> commit any changes.  I'll let you know what I find.
> >>>>>>
> >>>>>> Cheers,
> >>>>>> Ed
> >>>>>>
> >>>>>> On Thu, 2008-10-02 at 12:29 -0700, Isabelle Phan wrote:
> >>>>>>             
> >>>>>>> Hello
> >>>>>>>
> >>>>>>> I am running Apollo 1.9.5 on a chado database and having
> >>>>>>>               
> >>>>>> trouble editing
> >>>>>>             
> >>>>>>> data with the Annotation editor:
> >>>>>>>
> >>>>>>> 1) add synonym to gene name seems to work, data is saved 
> >>>>>>>               
> >>>> in tables
> >>>>         
> >>>>>>> feature_synonym and synonym in  but error logs returns:
> >>>>>>> lookup failed for cvterm_id for cvterm with name ='synonym'
> >>>>>>> database has no 'synonym' cvterm;
> >>>>>>>
> >>>>>>> I checked that an entry exists in table cvterm with name 
> >>>>>>>               
> >>>> = 'synonym'
> >>>>         
> >>>>>>> (cvterm_id=28874), so I don't quite understand that message.
> >>>>>>>
> >>>>>>> 2) delete synonym from gene name fails. The interface 
> >>>>>>>               
> >>>> shows no error
> >>>>         
> >>>>>>> upon saving, but the records are still there in 
> >>>>>>>               
> >>>> feature_synonym and
> >>>>         
> >>>>>>> synonym, and the error logs show the same messages as above
> >>>>>>>               
> >>>>>> after the
> >>>>>>             
> >>>>>>> DELETE statement.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> Isabelle
> >>>>>>> _______________________________________________
> >>>>>>> apollo mailing list
> >>>>>>> [email protected]
> >>>>>>> http://mail.fruitfly.org/mailman/listinfo/apollo
> >>>>>>>
> >>>>>>>               
> >>>>>>             
> >>>>> _______________________________________________
> >>>>> apollo mailing list
> >>>>> [email protected]
> >>>>> http://mail.fruitfly.org/mailman/listinfo/apollo
> >>>>>
> >>>>>           
> >>>>
> >>>> -- 
> >>>> --------------------------------------------------------------
> >>>> ----------
> >>>> Scott Cain, Ph. D.                                   
> >>>> [EMAIL PROTECTED]
> >>>> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> >>>> Ontario Institute for Cancer Research
> >>>>
> >>>>         
> >>> _______________________________________________
> >>> apollo mailing list
> >>> [email protected]
> >>> http://mail.fruitfly.org/mailman/listinfo/apollo
> >>>
> >>>       
> >> _______________________________________________
> >> apollo mailing list
> >> [email protected]
> >> http://mail.fruitfly.org/mailman/listinfo/apollo
> >>
> >>     
> >
> > _______________________________________________
> > apollo mailing list
> > [email protected]
> > http://mail.fruitfly.org/mailman/listinfo/apollo
> >   
> 
> 

_______________________________________________
apollo mailing list
[email protected]
http://mail.fruitfly.org/mailman/listinfo/apollo

Reply via email to