SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

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

SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

Lacey-Anne Sanderson
Ran into an error over the weekend:
Unless your uniquename=name, when syncing features you get drupal nodes with no feature id.

This is due to title being assigned the name on line 1380 in tripal_feature_sync_feature ($feature_id) and then the feature id being retrieved using uniquename=title on line 422-424 in chado_feature_insert($node). If name!=uniquename then the select feature_id query fails and the entry in chado_feature has feature_id=0.

In my local copy, I changed the new node in tripal_feature_sync_feature ($feature_id) to have uniquename as the title. This appears to have fixed it. 

Lacey

------------------------------------------------------
Lacey-Anne Sanderson
Bioinformaticist
Pulse Crop Breeding and Genetics
Phone: (306) 966-2430
Room 3D10 Argriculture
Department of Plant Sciences
University of Saskatchewan


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

Stephen Ficklin

Hi Lacey,

 

Sorry you had this problem.  I’m glad you worked around it…

 

We can make the same fix in the code.  Atlhough, I think using the ‘name’ of the feature may still be the preferred way that people refer to features.  Dave or Scott (or anyone else), do you have an opinion on what folks would prefer as the page title for a feature? 

 

Drupal may complain about having two nodes with the same title.   We’ll have to see.

 

Thanks,

Stephen

 

From: Lacey-Anne Sanderson [mailto:[hidden email]]
Sent: Monday, June 28, 2010 11:31 AM
To: Stephen Ficklin; GMOD Tripal
Subject: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

 

Ran into an error over the weekend:

Unless your uniquename=name, when syncing features you get drupal nodes with no feature id.

 

This is due to title being assigned the name on line 1380 in tripal_feature_sync_feature ($feature_id) and then the feature id being retrieved using uniquename=title on line 422-424 in chado_feature_insert($node). If name!=uniquename then the select feature_id query fails and the entry in chado_feature has feature_id=0.

 

In my local copy, I changed the new node in tripal_feature_sync_feature ($feature_id) to have uniquename as the title. This appears to have fixed it. 

 

Lacey

 

------------------------------------------------------

Lacey-Anne Sanderson

Bioinformaticist

Pulse Crop Breeding and Genetics

Phone: (306) 966-2430

Room 3D10 Argriculture

Department of Plant Sciences

University of Saskatchewan

 


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

Scott Cain
Hi Stephen and Lacey,

I think that having feature.name as a page title is the most desirable
thing, but looking things up by name is liable to cause problems.
Even looking up by feature.uniquename can cause problems, but I think
you are also specifying organism_id and type_id, so that should be
fine.  Is it possible to have the page name be feature.name, but look
things up by feature.unquename?

Scott


On Mon, Jun 28, 2010 at 12:17 PM, Stephen Ficklin <[hidden email]> wrote:

> Hi Lacey,
>
>
>
> Sorry you had this problem.  I’m glad you worked around it…
>
>
>
> We can make the same fix in the code.  Atlhough, I think using the ‘name’ of
> the feature may still be the preferred way that people refer to features.
> Dave or Scott (or anyone else), do you have an opinion on what folks would
> prefer as the page title for a feature?
>
>
>
> Drupal may complain about having two nodes with the same title.   We’ll have
> to see.
>
>
>
> Thanks,
>
> Stephen
>
>
>
> From: Lacey-Anne Sanderson [mailto:[hidden email]]
> Sent: Monday, June 28, 2010 11:31 AM
> To: Stephen Ficklin; GMOD Tripal
> Subject: SOLVED: Feature Insertion Error; No Feature ID Due to title = name
> & uniquename
>
>
>
> Ran into an error over the weekend:
>
> Unless your uniquename=name, when syncing features you get drupal nodes with
> no feature id.
>
>
>
> This is due to title being assigned the name on line 1380
> in tripal_feature_sync_feature ($feature_id) and then the feature id being
> retrieved using uniquename=title on line 422-424
> in chado_feature_insert($node). If name!=uniquename then the select
> feature_id query fails and the entry in chado_feature has feature_id=0.
>
>
>
> In my local copy, I changed the new node in tripal_feature_sync_feature
> ($feature_id) to have uniquename as the title. This appears to have fixed
> it.
>
>
>
> Lacey
>
>
>
> ------------------------------------------------------
>
> Lacey-Anne Sanderson
>
> Bioinformaticist
>
> Pulse Crop Breeding and Genetics
>
> Phone: (306) 966-2430
>
> Room 3D10 Argriculture
>
> Department of Plant Sciences
>
> University of Saskatchewan
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Gmod-tripal mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-tripal
>
>



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

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

Lacey-Anne Sanderson
In reply to this post by Lacey-Anne Sanderson
Missed Mailing list
------------------------------------------------------
Lacey-Anne Sanderson
Bioinformaticist
Pulse Crop Breeding and Genetics
Phone: (306) 966-2430
Room 3D10 Argriculture
Department of Plant Sciences
University of Saskatchewan

Begin forwarded message:

From: Lacey-Anne Sanderson <[hidden email]>
Date: June 28, 2010 10:42:58 AM CST
To: Stephen Ficklin <[hidden email]>
Subject: Re: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename

I definitely agree that the name is more intuitive for the title. But then we run into problems with retrieving the feature_id in the insert, since we can't assume the name is  unique and we don't have access to the uniquename anymore.

Lacey

------------------------------------------------------
Lacey-Anne Sanderson
Bioinformaticist
Pulse Crop Breeding and Genetics
Phone: (306) 966-2430
Room 3D10 Argriculture
Department of Plant Sciences
University of Saskatchewan

On 2010-06-28, at 10:17 AM, Stephen Ficklin wrote:

Hi Lacey,
 
Sorry you had this problem.  I’m glad you worked around it…
 
We can make the same fix in the code.  Atlhough, I think using the ‘name’ of the feature may still be the preferred way that people refer to features.  Dave or Scott (or anyone else), do you have an opinion on what folks would prefer as the page title for a feature? 
 
Drupal may complain about having two nodes with the same title.   We’ll have to see.
 
Thanks,
Stephen
 
From: Lacey-Anne Sanderson [mailto:[hidden email]] 
Sent: Monday, June 28, 2010 11:31 AM
To: Stephen Ficklin; GMOD Tripal
Subject: SOLVED: Feature Insertion Error; No Feature ID Due to title = name & uniquename
 
Ran into an error over the weekend:
Unless your uniquename=name, when syncing features you get drupal nodes with no feature id.
 
This is due to title being assigned the name on line 1380 in tripal_feature_sync_feature ($feature_id) and then the feature id being retrieved using uniquename=title on line 422-424 in chado_feature_insert($node). If name!=uniquename then the select feature_id query fails and the entry in chado_feature has feature_id=0.
 
In my local copy, I changed the new node in tripal_feature_sync_feature ($feature_id) to have uniquename as the title. This appears to have fixed it. 
 
Lacey
 
------------------------------------------------------
Lacey-Anne Sanderson
Bioinformaticist
Pulse Crop Breeding and Genetics
Phone: (306) 966-2430
Room 3D10 Argriculture
Department of Plant Sciences
University of Saskatchewan
 



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal