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

Container key values #77

Merged
merged 11 commits into from
Jun 5, 2023
Merged

Container key values #77

merged 11 commits into from
Jun 5, 2023

Conversation

khaledk2
Copy link
Collaborator

@khaledk2 khaledk2 commented Jan 22, 2023

This PR adds two ends points:

  • container_keyvalues: This will return all the available values for a key in a container, the user should provide the key and the container name, for example, to return the saved values for a cell line in container id0034, the following should be used:
    https://idr-testing.openmicroscopy.org/searchengine/api/v1/resources/image/container_keyvalues/?container_name=idr0034&key=cell line
    This is the returned results:
[
  {
    "name": "idr0034-kilpinen-hipsci/screenA",
    "results": [
      {
        "key": "cell line",
        "no_image": 324,
        "value": "HPSI0313i-airc_2"
      },
      {
        "key": "cell line",
        "no_image": 324,
        "value": "HPSI0313i-airc_3"
      },
      {
        "key": "cell line",
        "no_image": 324,
        "value": "HPSI0613i-auim_2"
      },
      {
        "key": "cell line",
        "no_image": 324,
        "value": "HPSI0713i-darw_2"
      },
      {
        "key": "cell line",
        "no_image": 324,
        "value": "HPSI0713i-kaks_2"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0413i-ougl_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0413i-ougl_3"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0513i-coio_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0513i-coio_2"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0513i-cuau_2"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0513i-euir_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0513i-leeh_2"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0613i-riiv_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0713i-darw_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0713i-qimz_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0713i-ruyv_1"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0713i-ruyv_3"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0813i-meqo_2"
      },
      {
        "key": "cell line",
        "no_image": 243,
        "value": "HPSI0813i-meqo_3"
      },
      {
        "key": "cell line",
        "no_image": 162,
        "value": "HPSI0513i-cuau_1"
      },
      {
        "key": "cell line",
        "no_image": 162,
        "value": "HPSI0513i-euir_2"
      },
      {
        "key": "cell line",
        "no_image": 162,
        "value": "HPSI0513i-leeh_3"
      },
      {
        "key": "cell line",
        "no_image": 162,
        "value": "HPSI0713i-kaks_3"
      },
      {
        "key": "cell line",
        "no_image": 162,
        "value": "HPSI0713i-qimz_2"
      },
      {
        "key": "cell line",
        "no_image": 81,
        "value": "HPSI0413i-iakz_1"
      },
      {
        "key": "cell line",
        "no_image": 81,
        "value": "HPSI0413i-iakz_2"
      },
      {
        "key": "cell line",
        "no_image": 81,
        "value": "HPSI0613i-auim_3"
      },
      {
        "key": "cell line",
        "no_image": 81,
        "value": "HPSI0613i-riiv_3"
      }
    ],
    "type": "screen"
  }
]
  • container_keys, this endpoint will return the available attributes with a container, for example, to return the available attributes for the idr0034 container, this should be used:
    https://idr-testing.openmicroscopy.org/searchengine/api/v1/resources/image/container_keys/?container_name=idr0034
    This is the returned results:
[
  {
    "name": "idr0034-kilpinen-hipsci/screenA",
    "results": [
      {
        "key": "biosamples identifier",
        "no_image": 6156
      },
      {
        "key": "biosamples identifier url",
        "no_image": 6156
      },
      {
        "key": "cell line",
        "no_image": 6156
      },
      {
        "key": "cell line url",
        "no_image": 6156
      },
      {
        "key": "cell type",
        "no_image": 6156
      },
      {
        "key": "channels",
        "no_image": 6156
      },
      {
        "key": "disease state",
        "no_image": 6156
      },
      {
        "key": "donor identifier",
        "no_image": 6156
      },
      {
        "key": "operetta measurement",
        "no_image": 6156
      },
      {
        "key": "operetta plate name",
        "no_image": 6156
      },
      {
        "key": "organism",
        "no_image": 6156
      },
      {
        "key": "progenitor cell type",
        "no_image": 6156
      },
      {
        "key": "results measurements",
        "no_image": 6156
      },
      {
        "key": "results summary",
        "no_image": 6156
      },
      {
        "key": "sex",
        "no_image": 6156
      },
      {
        "key": "chembl identifier",
        "no_image": 5994
      },
      {
        "key": "chembl identifier url",
        "no_image": 5994
      },
      {
        "key": "compound name",
        "no_image": 5994
      },
      {
        "key": "compound name url",
        "no_image": 5994
      },
      {
        "key": "dose",
        "no_image": 5994
      },
      {
        "key": "age",
        "no_image": 972
      },
      {
        "key": "ethnicity",
        "no_image": 972
      }
    ],
    "type": "screen"
  }
]

@jburel
Copy link
Member

jburel commented Jan 27, 2023

@khaledk2 have you considered passing multiple containers name e.g. idr0034, idr0035?

@khaledk2
Copy link
Collaborator Author

It searches using the contains operator (for the container name ). So, if idr003 is used as the container name, it will return all the containers in the IDR whose names contain this term, including idr0034 and idr0035.

@jburel
Copy link
Member

jburel commented Jan 27, 2023

yes but it will also contain idr0036 etc. which is potentially more that one will need.
That's okay

@khaledk2 khaledk2 force-pushed the container_key_values branch from 48bb411 to 127c4f4 Compare January 27, 2023 19:11
@khaledk2
Copy link
Collaborator Author

This PR has been deployed in idr-testing.

@jburel
Copy link
Member

jburel commented Jan 28, 2023

Thanks

@jburel
Copy link
Member

jburel commented Feb 2, 2023

Using this PR to retrieve gene identifier associated to a given study.
I have not yet used the CSV export option

@khaledk2
Copy link
Collaborator Author

khaledk2 commented Feb 2, 2023

CSV export option is now available in idr-testing

The following example is to export a CSV file for the available values for the gene identifier inside container idr0114
https://idr-testing.openmicroscopy.org/searchengine//api/v1/resources/image/container_keyvalues/?container_name=idr0114&key=gene identifier&csv=true

This example is to export a CSV file for the available keys inside container idr0114
https://idr-testing.openmicroscopy.org/searchengine//api/v1/resources/image/container_keys/?container_name=idr0114&csv=true

@khaledk2
Copy link
Collaborator Author

khaledk2 commented Feb 6, 2023

I fixed that and pushed the changes.

@jburel
Copy link
Member

jburel commented Mar 1, 2023

typo in file name conatiner_key_values.py => container_key_values.py

@khaledk2
Copy link
Collaborator Author

khaledk2 commented Mar 1, 2023

@jburel I have fixed the file name typo.

@khaledk2
Copy link
Collaborator Author

khaledk2 commented May 4, 2023

@jburel do you have any other comments?

@jburel
Copy link
Member

jburel commented Jun 5, 2023

Sorry for the delay

@jburel jburel merged commit a467795 into ome:main Jun 5, 2023
khaledk2 pushed a commit to khaledk2/omero_search_engine that referenced this pull request Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants