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

Species filter is getting ignored in the metadata search #159

Open
3 tasks done
ke4 opened this issue Jun 21, 2024 · 5 comments · Fixed by ebi-gene-expression-group/atlas-web-single-cell#434 or #158
Open
3 tasks done
Assignees
Labels
bug Something isn't working cell type wheel

Comments

@ke4
Copy link
Contributor

ke4 commented Jun 21, 2024

The Species filter in the metadata search is getting ignored.

Steps to reproduce:

  1. Go to the metadata search in Single Cell Expression Atlas
  2. Type a search term into the Search term box. For example: liver
  3. Click on the Search button
  4. On the appearing cell type wheel page select a Species from the dropdown, for example: Mus musculus

Expected result:
The cell type wheel only shows the result for the selected species.

Actual result:
The cell type wheel shows the result for all the species.

The above description was a bit confusing:

So, I'm adding here detailed requirements after our meeting

Use cases:

  • 1. Gene search

  • Go to SCXA Home

  • Enter a gene ID/Symbol as a search term(pick only from gene Symbol category) and species drop-down -> any/choose species and click search

  • Now expected and actual are the same as we will be on the "gene-search-results" page

    Endpoint: json/search

  • 2. Metadata search

    • Go to SCXA Home
    • Enter the organism part as a search term (pick only from the metadata category from the popup suggestions for the organism part). Example: liver
    • Choose a species or default to 'any'
    • Click on 'search' button

Now expected and actual is the "cell-type-wheel-experiment-heatmap" page with the cell-type wheel data

Bug

  • 3. Metadata search

    • Go to SCXA Home
    • Enter the organism part as a search term (pick only from the metadata category from the popup suggestions for the organism part). Example: liver
    • Choose a species mus musculus
    • Click on 'search' button

    Expected is: cell type wheel should refresh only species mus musculus data + search term(liver)
    Actual is: Cell type wheel data still contains multiple species data

Image

Bug fix - The Cell type wheel should refresh based on the user search term input and species drop-down value(Input) after pressing the 'search' button

Expected and actual - Wheel data should be user-selected species data with the mentioned organism part

Note: Follow the metadata rule as I mentioned in the point 2

Endpoint navigation in the backend for points 2 and 3 is the same as I provided here:

Endpoint1- json/search -> redirects to Endpoint2
Endpoint2- /search/metadata/{term} ->Produce HTML response
Endpoint3- /json/cell-type-wheel/{searchTerm} -> Json payload

@ke4 ke4 added the bug Something isn't working label Jun 21, 2024
@upendrakumbham
Copy link
Contributor

During my investigation, I found that we are supporting from the backend - but we are not passing species param from the frontend I believe as per the code:

@GetMapping(value = "/json/cell-type-wheel/{searchTerm}",
                produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String jsonCellTypeWheel(@PathVariable String searchTerm,
                                    @RequestParam(name = "species", defaultValue = "") String species) {
        return GSON.toJson(
                highchartsSunburstAdapter
                        .getCellTypeWheelSunburst(searchTerm, cellTypeWheelService.search(searchTerm, species)));
    }

@upendrakumbham
Copy link
Contributor

In the Atlas components repo - file name - CellTypeWheelExperimentHeatmap.js

 <CellTypeWheelFetchLoader
              host={props.host}
              resource={URI(props.searchTerm, props.cellTypeWheelResource).toString()}
              fulfilledPayloadProvider={cellTypeWheelData => ({ data: cellTypeWheelData })}
              searchTerm={props.searchTerm}
              onCellTypeWheelClick={onCellTypeWheelClick}
            />

I believe we need to pass species here from the dropdown when user chooses a species along with search term

@lingyun1010
Copy link
Contributor

lingyun1010 commented Jul 5, 2024

Bugs we observed for now related to cell type wheel gene expression page:

  1. From home page to cell type wheel page, species is not passed by routing/URL.

  2. In the cell type wheel page

    Search boxes

    • species box is not always working: it is not working when you change the species alone but is working when you change the species and then followed by search term changes
    • search term box is not always working: when you select from user free typing section, for example liver, no cell type data responded; when you select from metadata section, search button is not trigerring any requests.

    Cell type wheel

    • it doesn't take species parameter from the search box
    • when there are a lot of data loaded, for example, homo sapiens, it doesn't display by giving info like no data to display
    • when the search term is species like homo sapiens , the cell type wheel is not working by clicking to show the marker gene heatmap view.
  3. Endpoint issue

@ke4 ke4 changed the title Investigate species filter for the metadata search Species filter is getting ignored in the metadata search Jul 5, 2024
@ke4
Copy link
Contributor Author

ke4 commented Jul 5, 2024

Based on the previous comment by @lingyun1010 I created the following separate tickets:

and we already had this ticket:

I won't delete the above comment, just to have it if we need it, but that comment does not belong to this current ticket.

@ke4 ke4 transferred this issue from ebi-gene-expression-group/atlas-web-single-cell Aug 5, 2024
@ke4 ke4 linked a pull request Aug 5, 2024 that will close this issue
@ke4
Copy link
Contributor Author

ke4 commented Aug 7, 2024

We need another PR for single cell repo where we are using the latest components from atlas-components repo.
Thanks

@ke4 ke4 reopened this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment