multiple features of the same uniqueId returned in search

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

multiple features of the same uniqueId returned in search

Sofia Robb
When I search for a feature, the search returns more than 1 result for the same feature (all have the same unique ID). Each feature has 3 analysis uploads (gff, fasta, blast), maybe this is why I have 3 results. When I go to each feature page they all look the same. How can I reduce the redundancy in the search results.

Inline image 1

Thanks,
Sofia

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

_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: multiple features of the same uniqueId returned in search

Stephen Ficklin-2
Hi Sofia,

Can you describe how this form is created?  Was this form created using Drupal Views or custom PHP code?

If Drupal Views can you export it and send it along?  We can check it out to see what might be going on.

Thanks,
Stephen

On 1/5/2016 12:02 PM, Sofia Robb wrote:
When I search for a feature, the search returns more than 1 result for the same feature (all have the same unique ID). Each feature has 3 analysis uploads (gff, fasta, blast), maybe this is why I have 3 results. When I go to each feature page they all look the same. How can I reduce the redundancy in the search results.

Inline image 1

Thanks,
Sofia


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


_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal


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

_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: multiple features of the same uniqueId returned in search

Sofia Robb
Hi Stephen,

Happy New Year!!


I followed this tutorial: http://tripal.info/node/136. I think I followed it exactly..... 

here is the export:
$view = new view();
$view->name = 'tripal_feature_user_feature';
$view->description = 'Allows users to search feature data';
$view->tag = 'tripal search';
$view->base_table = 'feature';
$view->human_name = 'Feature User Search';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: features_all */
$handler = $view->new_display('default', 'features_all', 'default');
$handler->display->display_options['title'] = 'Sequence Features';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access chado_feature content';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '25';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['grouping'] = '';
$handler->display->display_options['style_options']['columns'] = array(
  'accession' => 'accession',
  'accession_link' => 'accession_link',
  'name' => 'name',
  'uniquename' => 'uniquename',
  'name_1' => 'name_1',
  'common_name' => 'common_name',
  'seqlen' => 'seqlen',
  'is_obsolete' => 'is_obsolete',
  'is_analysis' => 'is_analysis',
  'nid' => 'nid',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'accession' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'accession_link' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'uniquename' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name_1' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'common_name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'seqlen' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_obsolete' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_analysis' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'nid' => array(
    'separator' => '',
  ),
);
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['text']['id'] = 'area';
$handler->display->display_options['empty']['text']['table'] = 'views';
$handler->display->display_options['empty']['text']['field'] = 'area';
$handler->display->display_options['empty']['text']['content'] = 'No features matched the supplied criteria.';
$handler->display->display_options['empty']['text']['format'] = '2';
/* Relationship: Feature: Feature => Node */
$handler->display->display_options['relationships']['feature_id']['id'] = 'feature_id';
$handler->display->display_options['relationships']['feature_id']['table'] = 'chado_feature';
$handler->display->display_options['relationships']['feature_id']['field'] = 'feature_id';
/* Relationship: Chado Feature: feature_id => Chado Feature Synonyms List (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['id'] = 'feature_id_to_chado_feature_synonyms_list';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['field'] = 'feature_id_to_chado_feature_synonyms_list';
/* Relationship: Chado Feature: feature_id => Analysisfeature (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['id'] = 'feature_id_to_analysisfeature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['field'] = 'feature_id_to_analysisfeature';
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
/* Field: Node URL */
$handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
$handler->display->display_options['fields']['nid_1']['table'] = 'node';
$handler->display->display_options['fields']['nid_1']['field'] = 'nid';
$handler->display->display_options['fields']['nid_1']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';
$handler->display->display_options['fields']['nid_1']['label'] = '';
$handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';
$handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;
/* Field: Chado Feature: Uniquename */
$handler->display->display_options['fields']['uniquename']['id'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['table'] = 'feature';
$handler->display->display_options['fields']['uniquename']['field'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['label'] = 'Unique Name';
$handler->display->display_options['fields']['uniquename']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['uniquename']['alter']['path'] = '[nid_1]';
/* Field: Chado Feature: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'feature';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';
/* Field: Chado Cvterm: Name */
$handler->display->display_options['fields']['name_1']['id'] = 'name_1';
$handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
$handler->display->display_options['fields']['name_1']['field'] = 'name';
$handler->display->display_options['fields']['name_1']['label'] = 'Type';
/* Field: Chado Organism: Common Name */
$handler->display->display_options['fields']['common_name']['id'] = 'common_name';
$handler->display->display_options['fields']['common_name']['table'] = 'organism';
$handler->display->display_options['fields']['common_name']['field'] = 'common_name';
/* Field: Chado Feature: Seqlen */
$handler->display->display_options['fields']['seqlen']['id'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['table'] = 'feature';
$handler->display->display_options['fields']['seqlen']['field'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['label'] = 'Sequence Length';
/* Field: Chado Feature: Is Obsolete */
$handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['table'] = 'feature';
$handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['type'] = 'separator';
$handler->display->display_options['fields']['is_obsolete']['not'] = 0;
/* Field: Chado Chado Feature Synonyms List: Synonyms List */
$handler->display->display_options['fields']['synonyms_list']['id'] = 'synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['field'] = 'synonyms_list';
/* Field: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['exclude'] = TRUE;
/* Sort criterion: Chado Organism: Common Name */
$handler->display->display_options['sorts']['common_name']['id'] = 'common_name';
$handler->display->display_options['sorts']['common_name']['table'] = 'organism';
$handler->display->display_options['sorts']['common_name']['field'] = 'common_name';
/* Sort criterion: Chado Cvterm: Name */
$handler->display->display_options['sorts']['name']['id'] = 'name';
$handler->display->display_options['sorts']['name']['table'] = 'cvterm';
$handler->display->display_options['sorts']['name']['field'] = 'name';
/* Sort criterion: Chado Feature: Name */
$handler->display->display_options['sorts']['name_1']['id'] = 'name_1';
$handler->display->display_options['sorts']['name_1']['table'] = 'feature';
$handler->display->display_options['sorts']['name_1']['field'] = 'name';
/* Filter criterion: Chado Feature: Type Id */
$handler->display->display_options['filters']['type_id']['id'] = 'type_id';
$handler->display->display_options['filters']['type_id']['table'] = 'feature';
$handler->display->display_options['filters']['type_id']['field'] = 'type_id';
$handler->display->display_options['filters']['type_id']['value'] = array();
$handler->display->display_options['filters']['type_id']['group'] = 1;
$handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
$handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
$handler->display->display_options['filters']['type_id']['values_form_type'] = 'select';
$handler->display->display_options['filters']['type_id']['select_optional'] = TRUE;
/* Filter criterion: Chado Organism: Common Name */
$handler->display->display_options['filters']['common_name']['id'] = 'common_name';
$handler->display->display_options['filters']['common_name']['table'] = 'organism';
$handler->display->display_options['filters']['common_name']['field'] = 'common_name';
$handler->display->display_options['filters']['common_name']['value'] = array();
$handler->display->display_options['filters']['common_name']['group'] = 1;
$handler->display->display_options['filters']['common_name']['exposed'] = TRUE;
$handler->display->display_options['filters']['common_name']['expose']['operator_id'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['label'] = 'Organism Common Name';
$handler->display->display_options['filters']['common_name']['expose']['operator'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['identifier'] = 'organism';
$handler->display->display_options['filters']['common_name']['values_form_type'] = 'select';
$handler->display->display_options['filters']['common_name']['select_optional'] = TRUE;
/* Filter criterion: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['operator'] = 'word';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['value'] = 'Name or alias contains';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['group'] = 1;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['exposed'] = TRUE;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator_id'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['label'] = 'Uniquename And Synonyms List';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['identifier'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['remember_roles'] = array(
  2 => '2',
  1 => 0,
  3 => 0,
);
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['max_length'] = '40';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'chado/feature';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Features';
$handler->display->display_options['menu']['description'] = 'A biological sequence or a section of a biological sequence, or a collection of such sections.';
$handler->display->display_options['menu']['weight'] = '-10';


On Wed, Jan 6, 2016 at 10:21 AM, Stephen Ficklin <[hidden email]> wrote:
Hi Sofia,

Can you describe how this form is created?  Was this form created using Drupal Views or custom PHP code?

If Drupal Views can you export it and send it along?  We can check it out to see what might be going on.

Thanks,
Stephen


On 1/5/2016 12:02 PM, Sofia Robb wrote:
When I search for a feature, the search returns more than 1 result for the same feature (all have the same unique ID). Each feature has 3 analysis uploads (gff, fasta, blast), maybe this is why I have 3 results. When I go to each feature page they all look the same. How can I reduce the redundancy in the search results.

Inline image 1

Thanks,
Sofia


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


_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal



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

_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: multiple features of the same uniqueId returned in search

Stephen Ficklin-2
Hi Sofia,

Sorry for the slow reply.  PAG very much slowed me down.   So, I've loaded up your view and run it on a test site and I do not get duplicates.  I think the problem is definitely with the View.  I don't think you have the same feature 3 times in the database. Chado has a unique constraint on the feature table using the columns: uniquename, organism_id and type_id.  In your example screenshot those fields are all identical for the 3 results which isn't possible to do in the database so the same record is being included in the query results for the view 3 times. 

I see you have a relationship in the view of "feature_id => Analysisfeature (feature_id)".  I'm not sure why that is there.  Where you planning to add some fields for analyses to the search?  If not, try removing it and see if that helps.  The only other thing I can think of is that you may have multiple entries in the 'chado_feature_synonyms_list' table for the feature, but considering your screenshot shows no values in the synonym list column that may not be it.

Stephen


On 1/6/2016 9:31 AM, Sofia Robb wrote:
Hi Stephen,

Happy New Year!!


I followed this tutorial: http://tripal.info/node/136. I think I followed it exactly..... 

here is the export:
$view = new view();
$view->name = 'tripal_feature_user_feature';
$view->description = 'Allows users to search feature data';
$view->tag = 'tripal search';
$view->base_table = 'feature';
$view->human_name = 'Feature User Search';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: features_all */
$handler = $view->new_display('default', 'features_all', 'default');
$handler->display->display_options['title'] = 'Sequence Features';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access chado_feature content';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '25';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['grouping'] = '';
$handler->display->display_options['style_options']['columns'] = array(
  'accession' => 'accession',
  'accession_link' => 'accession_link',
  'name' => 'name',
  'uniquename' => 'uniquename',
  'name_1' => 'name_1',
  'common_name' => 'common_name',
  'seqlen' => 'seqlen',
  'is_obsolete' => 'is_obsolete',
  'is_analysis' => 'is_analysis',
  'nid' => 'nid',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'accession' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'accession_link' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'uniquename' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name_1' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'common_name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'seqlen' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_obsolete' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_analysis' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'nid' => array(
    'separator' => '',
  ),
);
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['text']['id'] = 'area';
$handler->display->display_options['empty']['text']['table'] = 'views';
$handler->display->display_options['empty']['text']['field'] = 'area';
$handler->display->display_options['empty']['text']['content'] = 'No features matched the supplied criteria.';
$handler->display->display_options['empty']['text']['format'] = '2';
/* Relationship: Feature: Feature => Node */
$handler->display->display_options['relationships']['feature_id']['id'] = 'feature_id';
$handler->display->display_options['relationships']['feature_id']['table'] = 'chado_feature';
$handler->display->display_options['relationships']['feature_id']['field'] = 'feature_id';
/* Relationship: Chado Feature: feature_id => Chado Feature Synonyms List (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['id'] = 'feature_id_to_chado_feature_synonyms_list';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['field'] = 'feature_id_to_chado_feature_synonyms_list';
/* Relationship: Chado Feature: feature_id => Analysisfeature (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['id'] = 'feature_id_to_analysisfeature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['field'] = 'feature_id_to_analysisfeature';
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
/* Field: Node URL */
$handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
$handler->display->display_options['fields']['nid_1']['table'] = 'node';
$handler->display->display_options['fields']['nid_1']['field'] = 'nid';
$handler->display->display_options['fields']['nid_1']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';
$handler->display->display_options['fields']['nid_1']['label'] = '';
$handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';
$handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;
/* Field: Chado Feature: Uniquename */
$handler->display->display_options['fields']['uniquename']['id'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['table'] = 'feature';
$handler->display->display_options['fields']['uniquename']['field'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['label'] = 'Unique Name';
$handler->display->display_options['fields']['uniquename']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['uniquename']['alter']['path'] = '[nid_1]';
/* Field: Chado Feature: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'feature';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';
/* Field: Chado Cvterm: Name */
$handler->display->display_options['fields']['name_1']['id'] = 'name_1';
$handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
$handler->display->display_options['fields']['name_1']['field'] = 'name';
$handler->display->display_options['fields']['name_1']['label'] = 'Type';
/* Field: Chado Organism: Common Name */
$handler->display->display_options['fields']['common_name']['id'] = 'common_name';
$handler->display->display_options['fields']['common_name']['table'] = 'organism';
$handler->display->display_options['fields']['common_name']['field'] = 'common_name';
/* Field: Chado Feature: Seqlen */
$handler->display->display_options['fields']['seqlen']['id'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['table'] = 'feature';
$handler->display->display_options['fields']['seqlen']['field'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['label'] = 'Sequence Length';
/* Field: Chado Feature: Is Obsolete */
$handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['table'] = 'feature';
$handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['type'] = 'separator';
$handler->display->display_options['fields']['is_obsolete']['not'] = 0;
/* Field: Chado Chado Feature Synonyms List: Synonyms List */
$handler->display->display_options['fields']['synonyms_list']['id'] = 'synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['field'] = 'synonyms_list';
/* Field: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['exclude'] = TRUE;
/* Sort criterion: Chado Organism: Common Name */
$handler->display->display_options['sorts']['common_name']['id'] = 'common_name';
$handler->display->display_options['sorts']['common_name']['table'] = 'organism';
$handler->display->display_options['sorts']['common_name']['field'] = 'common_name';
/* Sort criterion: Chado Cvterm: Name */
$handler->display->display_options['sorts']['name']['id'] = 'name';
$handler->display->display_options['sorts']['name']['table'] = 'cvterm';
$handler->display->display_options['sorts']['name']['field'] = 'name';
/* Sort criterion: Chado Feature: Name */
$handler->display->display_options['sorts']['name_1']['id'] = 'name_1';
$handler->display->display_options['sorts']['name_1']['table'] = 'feature';
$handler->display->display_options['sorts']['name_1']['field'] = 'name';
/* Filter criterion: Chado Feature: Type Id */
$handler->display->display_options['filters']['type_id']['id'] = 'type_id';
$handler->display->display_options['filters']['type_id']['table'] = 'feature';
$handler->display->display_options['filters']['type_id']['field'] = 'type_id';
$handler->display->display_options['filters']['type_id']['value'] = array();
$handler->display->display_options['filters']['type_id']['group'] = 1;
$handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
$handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
$handler->display->display_options['filters']['type_id']['values_form_type'] = 'select';
$handler->display->display_options['filters']['type_id']['select_optional'] = TRUE;
/* Filter criterion: Chado Organism: Common Name */
$handler->display->display_options['filters']['common_name']['id'] = 'common_name';
$handler->display->display_options['filters']['common_name']['table'] = 'organism';
$handler->display->display_options['filters']['common_name']['field'] = 'common_name';
$handler->display->display_options['filters']['common_name']['value'] = array();
$handler->display->display_options['filters']['common_name']['group'] = 1;
$handler->display->display_options['filters']['common_name']['exposed'] = TRUE;
$handler->display->display_options['filters']['common_name']['expose']['operator_id'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['label'] = 'Organism Common Name';
$handler->display->display_options['filters']['common_name']['expose']['operator'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['identifier'] = 'organism';
$handler->display->display_options['filters']['common_name']['values_form_type'] = 'select';
$handler->display->display_options['filters']['common_name']['select_optional'] = TRUE;
/* Filter criterion: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['operator'] = 'word';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['value'] = 'Name or alias contains';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['group'] = 1;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['exposed'] = TRUE;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator_id'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['label'] = 'Uniquename And Synonyms List';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['identifier'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['remember_roles'] = array(
  2 => '2',
  1 => 0,
  3 => 0,
);
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['max_length'] = '40';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'chado/feature';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Features';
$handler->display->display_options['menu']['description'] = 'A biological sequence or a section of a biological sequence, or a collection of such sections.';
$handler->display->display_options['menu']['weight'] = '-10';


On Wed, Jan 6, 2016 at 10:21 AM, Stephen Ficklin <[hidden email]> wrote:
Hi Sofia,

Can you describe how this form is created?  Was this form created using Drupal Views or custom PHP code?

If Drupal Views can you export it and send it along?  We can check it out to see what might be going on.

Thanks,
Stephen


On 1/5/2016 12:02 PM, Sofia Robb wrote:
When I search for a feature, the search returns more than 1 result for the same feature (all have the same unique ID). Each feature has 3 analysis uploads (gff, fasta, blast), maybe this is why I have 3 results. When I go to each feature page they all look the same. How can I reduce the redundancy in the search results.

Inline image 1

Thanks,
Sofia


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


_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal




------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: multiple features of the same uniqueId returned in search

Sofia Robb
That was it! Thanks. I was playing around with trying to create a search of interproscan results, but didn't get any further than adding the "feature_id => Analysisfeature (feature_id)" and realizing I didn't know what to do next. I thought I removed it, but I guess I didn't.

Thank you once again Stephen!
Sofia

On Thu, Jan 21, 2016 at 11:46 AM, Stephen Ficklin <[hidden email]> wrote:
Hi Sofia,

Sorry for the slow reply.  PAG very much slowed me down.   So, I've loaded up your view and run it on a test site and I do not get duplicates.  I think the problem is definitely with the View.  I don't think you have the same feature 3 times in the database. Chado has a unique constraint on the feature table using the columns: uniquename, organism_id and type_id.  In your example screenshot those fields are all identical for the 3 results which isn't possible to do in the database so the same record is being included in the query results for the view 3 times. 

I see you have a relationship in the view of "feature_id => Analysisfeature (feature_id)".  I'm not sure why that is there.  Where you planning to add some fields for analyses to the search?  If not, try removing it and see if that helps.  The only other thing I can think of is that you may have multiple entries in the 'chado_feature_synonyms_list' table for the feature, but considering your screenshot shows no values in the synonym list column that may not be it.

Stephen



On 1/6/2016 9:31 AM, Sofia Robb wrote:
Hi Stephen,

Happy New Year!!


I followed this tutorial: http://tripal.info/node/136. I think I followed it exactly..... 

here is the export:
$view = new view();
$view->name = 'tripal_feature_user_feature';
$view->description = 'Allows users to search feature data';
$view->tag = 'tripal search';
$view->base_table = 'feature';
$view->human_name = 'Feature User Search';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: features_all */
$handler = $view->new_display('default', 'features_all', 'default');
$handler->display->display_options['title'] = 'Sequence Features';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access chado_feature content';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '25';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['grouping'] = '';
$handler->display->display_options['style_options']['columns'] = array(
  'accession' => 'accession',
  'accession_link' => 'accession_link',
  'name' => 'name',
  'uniquename' => 'uniquename',
  'name_1' => 'name_1',
  'common_name' => 'common_name',
  'seqlen' => 'seqlen',
  'is_obsolete' => 'is_obsolete',
  'is_analysis' => 'is_analysis',
  'nid' => 'nid',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'accession' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'accession_link' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'uniquename' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'name_1' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'common_name' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'seqlen' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_obsolete' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'is_analysis' => array(
    'sortable' => 1,
    'separator' => '',
  ),
  'nid' => array(
    'separator' => '',
  ),
);
/* No results behavior: Global: Text area */
$handler->display->display_options['empty']['text']['id'] = 'area';
$handler->display->display_options['empty']['text']['table'] = 'views';
$handler->display->display_options['empty']['text']['field'] = 'area';
$handler->display->display_options['empty']['text']['content'] = 'No features matched the supplied criteria.';
$handler->display->display_options['empty']['text']['format'] = '2';
/* Relationship: Feature: Feature => Node */
$handler->display->display_options['relationships']['feature_id']['id'] = 'feature_id';
$handler->display->display_options['relationships']['feature_id']['table'] = 'chado_feature';
$handler->display->display_options['relationships']['feature_id']['field'] = 'feature_id';
/* Relationship: Chado Feature: feature_id => Chado Feature Synonyms List (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['id'] = 'feature_id_to_chado_feature_synonyms_list';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_chado_feature_synonyms_list']['field'] = 'feature_id_to_chado_feature_synonyms_list';
/* Relationship: Chado Feature: feature_id => Analysisfeature (feature_id) */
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['id'] = 'feature_id_to_analysisfeature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['table'] = 'feature';
$handler->display->display_options['relationships']['feature_id_to_analysisfeature']['field'] = 'feature_id_to_analysisfeature';
/* Field: Content: Nid */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid']['exclude'] = TRUE;
/* Field: Node URL */
$handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
$handler->display->display_options['fields']['nid_1']['table'] = 'node';
$handler->display->display_options['fields']['nid_1']['field'] = 'nid';
$handler->display->display_options['fields']['nid_1']['relationship'] = 'feature_id';
$handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';
$handler->display->display_options['fields']['nid_1']['label'] = '';
$handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';
$handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;
/* Field: Chado Feature: Uniquename */
$handler->display->display_options['fields']['uniquename']['id'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['table'] = 'feature';
$handler->display->display_options['fields']['uniquename']['field'] = 'uniquename';
$handler->display->display_options['fields']['uniquename']['label'] = 'Unique Name';
$handler->display->display_options['fields']['uniquename']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['uniquename']['alter']['path'] = '[nid_1]';
/* Field: Chado Feature: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'feature';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
$handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';
/* Field: Chado Cvterm: Name */
$handler->display->display_options['fields']['name_1']['id'] = 'name_1';
$handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
$handler->display->display_options['fields']['name_1']['field'] = 'name';
$handler->display->display_options['fields']['name_1']['label'] = 'Type';
/* Field: Chado Organism: Common Name */
$handler->display->display_options['fields']['common_name']['id'] = 'common_name';
$handler->display->display_options['fields']['common_name']['table'] = 'organism';
$handler->display->display_options['fields']['common_name']['field'] = 'common_name';
/* Field: Chado Feature: Seqlen */
$handler->display->display_options['fields']['seqlen']['id'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['table'] = 'feature';
$handler->display->display_options['fields']['seqlen']['field'] = 'seqlen';
$handler->display->display_options['fields']['seqlen']['label'] = 'Sequence Length';
/* Field: Chado Feature: Is Obsolete */
$handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['table'] = 'feature';
$handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
$handler->display->display_options['fields']['is_obsolete']['type'] = 'separator';
$handler->display->display_options['fields']['is_obsolete']['not'] = 0;
/* Field: Chado Chado Feature Synonyms List: Synonyms List */
$handler->display->display_options['fields']['synonyms_list']['id'] = 'synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['synonyms_list']['field'] = 'synonyms_list';
/* Field: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['fields']['uniquename_and_synonyms_list']['exclude'] = TRUE;
/* Sort criterion: Chado Organism: Common Name */
$handler->display->display_options['sorts']['common_name']['id'] = 'common_name';
$handler->display->display_options['sorts']['common_name']['table'] = 'organism';
$handler->display->display_options['sorts']['common_name']['field'] = 'common_name';
/* Sort criterion: Chado Cvterm: Name */
$handler->display->display_options['sorts']['name']['id'] = 'name';
$handler->display->display_options['sorts']['name']['table'] = 'cvterm';
$handler->display->display_options['sorts']['name']['field'] = 'name';
/* Sort criterion: Chado Feature: Name */
$handler->display->display_options['sorts']['name_1']['id'] = 'name_1';
$handler->display->display_options['sorts']['name_1']['table'] = 'feature';
$handler->display->display_options['sorts']['name_1']['field'] = 'name';
/* Filter criterion: Chado Feature: Type Id */
$handler->display->display_options['filters']['type_id']['id'] = 'type_id';
$handler->display->display_options['filters']['type_id']['table'] = 'feature';
$handler->display->display_options['filters']['type_id']['field'] = 'type_id';
$handler->display->display_options['filters']['type_id']['value'] = array();
$handler->display->display_options['filters']['type_id']['group'] = 1;
$handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
$handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
$handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
$handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
$handler->display->display_options['filters']['type_id']['values_form_type'] = 'select';
$handler->display->display_options['filters']['type_id']['select_optional'] = TRUE;
/* Filter criterion: Chado Organism: Common Name */
$handler->display->display_options['filters']['common_name']['id'] = 'common_name';
$handler->display->display_options['filters']['common_name']['table'] = 'organism';
$handler->display->display_options['filters']['common_name']['field'] = 'common_name';
$handler->display->display_options['filters']['common_name']['value'] = array();
$handler->display->display_options['filters']['common_name']['group'] = 1;
$handler->display->display_options['filters']['common_name']['exposed'] = TRUE;
$handler->display->display_options['filters']['common_name']['expose']['operator_id'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['label'] = 'Organism Common Name';
$handler->display->display_options['filters']['common_name']['expose']['operator'] = 'common_name_op';
$handler->display->display_options['filters']['common_name']['expose']['identifier'] = 'organism';
$handler->display->display_options['filters']['common_name']['values_form_type'] = 'select';
$handler->display->display_options['filters']['common_name']['select_optional'] = TRUE;
/* Filter criterion: Chado Chado Feature Synonyms List: Uniquename And Synonyms List */
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['id'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['table'] = 'chado_feature_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['field'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['operator'] = 'word';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['value'] = 'Name or alias contains';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['group'] = 1;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['exposed'] = TRUE;
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator_id'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['label'] = 'Uniquename And Synonyms List';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['operator'] = 'uniquename_and_synonyms_list_op';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['identifier'] = 'uniquename_and_synonyms_list';
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['expose']['remember_roles'] = array(
  2 => '2',
  1 => 0,
  3 => 0,
);
$handler->display->display_options['filters']['uniquename_and_synonyms_list']['max_length'] = '40';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'chado/feature';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Features';
$handler->display->display_options['menu']['description'] = 'A biological sequence or a section of a biological sequence, or a collection of such sections.';
$handler->display->display_options['menu']['weight'] = '-10';


On Wed, Jan 6, 2016 at 10:21 AM, Stephen Ficklin <[hidden email]> wrote:
Hi Sofia,

Can you describe how this form is created?  Was this form created using Drupal Views or custom PHP code?

If Drupal Views can you export it and send it along?  We can check it out to see what might be going on.

Thanks,
Stephen


On 1/5/2016 12:02 PM, Sofia Robb wrote:
When I search for a feature, the search returns more than 1 result for the same feature (all have the same unique ID). Each feature has 3 analysis uploads (gff, fasta, blast), maybe this is why I have 3 results. When I go to each feature page they all look the same. How can I reduce the redundancy in the search results.

Inline image 1

Thanks,
Sofia


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


_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal





------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal