Skip to content

Add genome and feature group creation to Protein Structure grid#1221

Open
olsonanl wants to merge 2 commits into
BV-BRC:alphafrom
olsonanl:bugfix/features-genomes-structure
Open

Add genome and feature group creation to Protein Structure grid#1221
olsonanl wants to merge 2 commits into
BV-BRC:alphafrom
olsonanl:bugfix/features-genomes-structure

Conversation

@olsonanl

@olsonanl olsonanl commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add structure_data to AddGroup action validContainerTypes in GridContainer.js
  • Add structure_data type handling to create feature groups by default
  • Add structure_data to conversionTypes in SelectionToGroup.js to enable dropdown selection between Feature and Genome groups

This allows users viewing the Structures tab on taxonomy pages to:

  1. Select protein structures in the grid
  2. Click the GROUP icon in the action bar
  3. Choose whether to create a Genome Group or Feature Group
  4. Save the group to their workspace

⚠️ Important: Do Not Merge Yet

This PR should NOT be merged until the corresponding Data API fixes are installed.

The Data API changes add access control filtering for protein_structure queries using a Solr cross-collection join on the genome collection. Without those changes, protein structures from private genomes may be exposed to unauthorized users.

Test plan

  • Navigate to a taxonomy page (e.g., /view/Taxonomy/1773#view_tab=structures)
  • Select one or more protein structures in the grid
  • Verify the GROUP icon appears in the green action bar
  • Click GROUP icon and verify dialog shows "Group Type" dropdown with "Feature" and "Genome" options
  • Test creating both Feature and Genome groups
  • Verify groups are saved correctly to workspace

🤖 Generated with Claude Code

olsonanl added 2 commits March 5, 2026 14:21
…Structure Grid

  Issue

  Users viewing the Structures tab on taxonomy pages could not create genome groups or feature groups from their selections because
   structure_data was not in the validContainerTypes for the AddGroup action.

  Files Modified

  1. public/js/p3/widget/GridContainer.js (bvbrc_website)

  Change 1a: Added structure_data to the validContainerTypes array for the AddGroup action (line ~1519):
  validContainerTypes: ['genome_data', 'sequence_data', 'feature_data', 'protein_data',
    'transcriptomics_experiment_data', 'transcriptomics_gene_data', 'spgene_data', 'structure_data']

  Change 1b: Added handling for structure_data in the type determination logic (lines ~1535-1537):
  } else if (containerWidget.containerType == 'structure_data') {
    type = 'feature_group';
  }

  2. public/js/p3/widget/SelectionToGroup.js (bvbrc_website)

  Added structure_data to the conversionTypes object to enable the type selector dropdown:
  conversionTypes: {
    feature_data: [{ label: 'Feature', value: 'feature_group' }, { label: 'Genome', value: 'genome_group' }],
    structure_data: [{ label: 'Feature', value: 'feature_group' }, { label: 'Genome', value: 'genome_group' }]
  },

  How It Works

  1. The GROUP icon now appears in the action bar when selecting protein structures
  2. When clicked, the SelectionToGroup widget detects inputType is structure_data and shows a dropdown with "Feature" and "Genome"
   options
  3. Users can create either a Feature Group (using feature_id) or a Genome Group (using genome_id) from selected structures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant