Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message suggesting aliases if no matching refName found #3199

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

garrettjstevens
Copy link
Collaborator

This is an attempt to help users know that they may need to configure refName aliases. Currently, if aliases are not set up and the refName doesn't match, it shows an empty display. This adds an error message by:

  • In FeatureRendererType.ts it calls getFeaturesInRegion on the adapter instead of getFeatures. This is basically a wrapper around getFeatures that includes a check to see if it has data for the refName.
  • Change hasDataForRefName to return true if refNames.length === 0. That way if the adapter does not support retrieving refNames, no error will be thrown.
  • Throw an error in getFeaturesInRegion if there is no data for the refName, with a suggestion to configure refName aliases.

The result looks like this:

@garrettjstevens garrettjstevens self-assigned this Sep 19, 2022
@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Sep 19, 2022
@cmdcolin
Copy link
Collaborator

I think this is not an "Erroneous" condition. If it is helpful to have a small indicator somehow, that might be ok, but I would not display a red error message. There are many conditions why an adapter might not have data for a given refname

@codecov
Copy link

codecov bot commented Sep 19, 2022

Codecov Report

Merging #3199 (cf07930) into track_message_updates (ea59fda) will increase coverage by 0.00%.
The diff coverage is 58.33%.

@@                  Coverage Diff                   @@
##           track_message_updates    #3199   +/-   ##
======================================================
  Coverage                  59.48%   59.48%           
======================================================
  Files                        671      671           
  Lines                      28735    28744    +9     
  Branches                    6968     6971    +3     
======================================================
+ Hits                       17093    17099    +6     
- Misses                     11320    11324    +4     
+ Partials                     322      321    -1     
Impacted Files Coverage Δ
packages/core/util/types/index.ts 64.77% <33.33%> (-2.31%) ⬇️
packages/core/data_adapters/BaseAdapter.ts 75.29% <66.66%> (+0.59%) ⬆️
...gableElementTypes/renderers/FeatureRendererType.ts 71.15% <100.00%> (ø)
...play/components/ServerSideRenderedBlockContent.tsx 97.72% <100.00%> (+2.37%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@garrettjstevens garrettjstevens changed the base branch from main to track_message_updates September 20, 2022 03:09
@garrettjstevens
Copy link
Collaborator Author

I added a change that uses #3200 to make it an informational message instead of an error.

@cmdcolin
Copy link
Collaborator

I think this may still be a bit too bold of a message for what can be normal conditions for a track

  • For example, the Y chromosome may not have any data for a XX sample, but if we are showing the entire genome ("Show all regions") it would display the diagnostic blue box here instead of an empty region
  • Same thing happens frequently on many model organisms with sparse data across many thousands of predicted contigs e.g. gene prediction data, and you could imagine in a linear synteny view, there could be many of these blue boxes inside some contigs and not on others if you are viewing multiple regions

I am sympathetic to the issue because I know that users run into this type of situation frequently. But, I just don't want to be presumptive about the data visualization.

Some ideas

  • Maybe a small icon positioned somewhere (like TrackBlurb)
  • Maybe something like a "track diagnostics", perhaps focusing on refname diagnostics. I often look in the "About track" dialog at the refnames on the tracks e.g. inspecting e.g. @sq lines on the BAM. That would be an easy place to direct users to when something goes wrong
  • If a big notification is helpful, may want to be able to hide it at least. I would maybe clarify the error presented as "ctgA" not found is a bit unclear

@garrettjstevens garrettjstevens marked this pull request as draft September 21, 2022 20:33
@rbuels rbuels added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Sep 28, 2022
Base automatically changed from track_message_updates to main September 30, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants