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

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

Marker genes shown in marker gene plot on first landing not consistent with gene shown when single cluster view selected #441

Closed ke4 closed 1 week ago

ke4 commented 1 month ago

Marker genes shown in marker gene plot on first landing not consistent with gene shown when single cluster view selected.

Example experiment: https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-MTAB-10371/

Step to reproduce:

  1. Go to Marker Genes tab
  2. Check the genes for cluster 2
  3. The filtered marker gene heatmap is not the same set of genes as shown in the full heatmap
lingyun1010 commented 1 month ago

The issue comes from this endpoint: https://wwwdev.ebi.ac.uk/gxa/sc/json/experiments/E-MTAB-10371/marker-genes-heatmap/cell-types?cellGroupType=10, the default endpoint when we landed in the marker gene heatmap, which gives us wrong data, i.e. distorted order.

When we update a Number of clusters value from the dropdown menu, we get the heatmap data from https://wwwdev.ebi.ac.uk/gxa/sc/json/experiments/E-MTAB-10371/marker-genes/clusters?k=10, which is correct order.

Given the information from Silvie, we would like to display inferred cell type - ** by default, but currently, the cell-types?cellGroupType is also taking a number.

Besides, in this example, https://www-test.ebi.ac.uk/gxa/sc/experiments/E-ANND-3/results/marker-genes, we have inferred cell type - ontology ID as the default option in both cell type plots and marker gene heatmap, but the marker gene heatmap is not right either, and we shouldn't have k= in the option label.

lingyun1010 commented 1 month ago

We should have marker gene heatmap data for inferred cell type if it has this cluster. For example https://wwwdev.ebi.ac.uk/gxa/sc/experiments/E-MTAB-9067/results/marker-genes. At least, we have the related PostgreSQL data on wwwdev now but not on www-test yet. (Please refer to table scxa_cell_group_marker_gene_stats and scxa_cell_group.

Hence, the proposed solution is gonna fix the marker gene heatmap bugs with inferred cell type as the cluster option.

lingyun1010 commented 1 month ago

Here are the steps we need to implement to fix the bugs in the marker gene heatmap page:

  • [ ] fix the endpoint json response from marker-gene-heatmap/cell-types?cellGroupType=_
sfexova commented 3 weeks ago

Hi @lingyun1010 we just had a chat with Irene and she also thinks we should go ahead with the syncing between the cell plots and the marker gene heatmap. So the implementation as we discussed at the team mtg yesterday is good but we should tweak the error message that they will see if they land on sth like 'sex' in the marker gene heatmap tab due to the syncing

lingyun1010 commented 2 weeks ago

Hi @lingyun1010 we just had a chat with Irene and she also thinks we should go ahead with the syncing between the cell plots and the marker gene heatmap. So the implementation as we discussed at the team mtg yesterday is good but we should tweak the error message that they will see if they land on sth like 'sex' in the marker gene heatmap tab due to the syncing

Yes, thanks @sfexova, let me know what title and non-data messages are proper for the new marker gene heatmap.

sfexova commented 2 weeks ago

I don't remember what the current error message says but I think sth like this could work: There are no marker genes for this value, please select another attribute or k value

As to the drop-down menu, I don't have any good ideas that would cover all the potential options - maybe simply Clusters by could work or we can leave it as Number of clusters - it's not too wrong I think

sfexova commented 2 weeks ago

let's just leave it (the drop-down menu title) - I think it's fine