ebi-gene-expression-group / atlas-web-single-cell

Single Cell Expression Atlas web application
Apache License 2.0
5 stars 5 forks source link

Inconsistency between cell plot and heat map #381

Closed ke4 closed 3 months ago

ke4 commented 8 months ago

The number of clusters isn’t conserved between the cell plot and marker gene tabs. There are two request parameters, one for each component (k and colourBy, respectively): experiments/{experiment_accession}/results/marker-genes?k=19&colourBy=8

Steps to reproduce:

  1. Go to Browse experiments page
  2. Select A lymphocyte-microglia-astrocyte axis in chronic active multiple sclerosis
  3. Select k=13 from the Colour plot by dropdown. URL is going to be: https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-GEOD-180759/results?colourBy=13
  4. Click on Marker Genes tab

Expected result: URL should be: https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-GEOD-180759/results/marker-genes?colourBy=13&k=38 (default cluster k value)

Actual result: URL is: https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-GEOD-180759/results/marker-genes?colourBy=13

lingyun1010 commented 5 months ago

@ke4 I have reproduced the above results, but I have two questions before implementing.

In the current implementation, the cell plot is taking colourBy as the plot parameter and marker gene heatmap is taking k as the parameter. Is it a feature to keep individual paramter or a bug?

If we want to keep the consistency, then do we still need two parameters in the URL, i.e. k and colourBy as shown in the Expected result?

sfexova commented 5 months ago

As discussed at the meeting yesterday, I think the behaviour should be as follows: 1) if user changes the color by parameter in the cell plots to a parameter also available in marker genes heatmap (only k values for now but hopefully will include inferred cell type option too at some point) and then moves to the marker genes tab, the parameter value shown there should be the same as what they'd selected in plots. 2) vice-versa if they change the k-value in marker genes heatmap and then move to cell plots the k- value change should be propagated to that plot as well 3) if they just use the browser back button to return the the cell plots from the marker genes plot or the other way round, they should see whatever values there were previously and see what they had view before - this is just to clarify as this behaviour depends on browser history, not our app 4) any recolouring plot choices by metadata that are not used in the marker gene heatmap (so all 'metadata' option for now but in future 'inferred cell type'-centric marker gene heatmaps should be made available in the results) will not be propagated to the marker genes results heatmap and the view there will thius remain at default k value or the last k-value the user had chosen before recolouring by metadata