plantinformatics/pretzel

Working Group Use Case #3 Extensions

Closed this issue · 8 comments

(part of #383)


Introduction

Testing of the prototype showed that it met the MVP requirements of #383.

Testing also suggested a number of usability enhancements which could be made to improve user ergonomics and suit the expected user work-flow better. These are noted in the following, and will be investigated and where the effort is reasonable for the benefit, these will be completed.

Suggested Enhancements

  • it is desirable to enable the user to append new names to either : samples / features, and issue a repeated request, and see the results

  • Add a button 'Clear Genotypes' to enable the user to start afresh after accumulating results from 1 or more searches.

  • Preferably the axes should be sorted in numeric/alpha order from left to right when first displayed (the user can rearrange these).

  • Disable the search button during the request

  • After request, indicate if markers are not found, e.g.

    • "No marker found with that name"
    • list of markers not found
    • similar for sample names
  • Set View : Outside Axis Margin to 0, to make more room for the Genotype Table, which is the primary display rather than the axes.

From : 20240731 Summary of Meeting 31 July 2024

  • Extension 1 : show where search result is with a feature-triangle beside the axis
    use feature triangles left of axis to show the location of search results
    The implementation is recorded in the following comment.
  • [+] Extension 2 : sample (search) filter (factor from Genotype Table controls)
    Done - recorded in Oct04 comment below

Extension 1: Show triangles for features found

This was implemented via source code changes in frontend GUI, which were able to leverage existing library function transient.showFeature().


Changes are complete and tested before commit. The commit is included in images that are built for the dev servers.
The screenshot shows the result of local testing before the commit.

  • b9e8fba genotype-search : show triangles for features found
    Included in image : plantinformaticscollaboration/pretzelupdate:v2024Sep05

Screenshot from 2024-09-05 11-49-11

Additional upgrade measures

During testing, some exceptions were encountered from undefined values in 'Genotype Search' resulting from the merge with the upgraded version.
These are fixed by the following commits :

pretzel
7bbc8a5 genotype-search handle undefined vcfGenotypeSamplesSelectedAll

plantinformatics/vcf-genotype-brapi
38a0bfb revert model name Feature to feature in addFeaturesJson
3392aca update version to 1.0.4

Display of Feature Triangles beside axis and display of SNPs in Genotype Table get intermittent results in user testing

Users exercising the 'Genotype Search' functionality on our internal test server reported that in some cases it only draws one triangle and isn't displaying all the SNPs in the table.
Repeating the request displayed all the expected triangles.

Also, one of the SNPs requested was not displayed in the Genotype Table. In one instance this was because of a typographical error in the SNP Name (missing suffix '-F').

Retest with the given test case used (Rht-B1,Rht-D1,Pina-D1,Pinb-D1) to check these 2 issues.

Extensions

Users suggested the SNPs in the Genotype Table could be ordered by chromosome, then position; at the moment it orders by position only.


Investigation

The data which demonstrated the issue is on the dev server, so the cause was identified by using local + dev server to have the benefit of un-minified source code when debugging; the process would have taken >5x longer to find in the (minified) production build, i.e. without multiple servers.

Solution

The locations of the found SNPs are used to set the domain of the brush, and a calculation which used scale to convert back from brush pixels to brushed domain resulted in a loss of precision :

feature.value_0
711599924

block.brushedDomain
Array [ 590394596, 711599923.9999999 ]

The solution implemented is to use the feature domain directly (exact) when possible, as in this case.

9331e9d ensure brushedDomain is exact so that outside SNPs are not filtered out of table
c1bdf42 handle errors from numeric ontologyId


Screenshot from 2024-09-19 13-16-41

Extension 2 : sample (search) filter (factor from Genotype Table controls)

To enable users to identify samples, the functionality of sample name filtering which is available in the Genotype Table settings / controls dialog is utilised also in the 'Genotype Search' panel. The design change is to factor the functionality into a component genotypes-samples, which is then used in both the Genotype Table settings / controls dialog and the 'Genotype Search' panel (i.e. manage-genotype and genotypes-search components).


This commit e1aee89 contains most of the changes required; the remaining work is to connect updates from dataset selection so that samples are requested and the display is updated.

  • e1aee89 factor sample filter from Genotype Table to Genotype Search

This commit is a follow-on from the work in #370.

  • 8f8dca1 add .nvmrc in frontend and lb4app

These commits add request and display of samples from user change to selected dataset.

  • a84b4cb get and display samples in genotype-search when user selects dataset
  • e53d187 disable adding a block of selectedDataset to viewedVCFBlocks

This screen shot shows the status.
Screenshot from 2024-10-07 14-57-57

Remaining work is to not show these visual elements :

  • the 'Common' checkbox, which is not required as the aim of this dialogue is to simplify the interface
  • the now-duplicate sample text input.

Those last 2 points are now implemented by these commits :

  • 52016e8 in Genotype Search don't show checkbox Common samplesIntersection and remove replaced Textarea .selectedSamplesInput
  • b05e679 re-render selectedFeatures when their number changes

Screenshot from 2024-10-08 16-27-03

Extension 3 : Order the Genotype Table first on chromosome, then position

Currently the Genotype Table displays rows in position order.
It has been extended from the original functionality of displaying a single chromosome to displaying multiple chromosomes, which is useful in some cases. In this case the chromosomes should be separated in the table, with SNP rows sorted by position within each chromosome.


  • abc6886 order the Genotype Table first on chromosome, then position
  • Built docker image, tagged as follows and pushed to dockerhub :
    [
    "pretzelupdate:latest",
    "plantinformaticscollaboration/pretzelupdate:latest",
    "plantinformaticscollaboration/pretzelupdate:v2024Oct11"
    ]

Screenshot from 2024-10-11 09-38-40

Fix reported issue : in this test, only one of the triangles is displayed

101c3b2 ensure manageGenotype is shown before setting selectedSamplesText
This fixes an issue which might have caused the reported issue.

Completed and Released

This work is complete and included in the v3.0.0 release #414 , and has been tested in production in that release.