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

feat(openchallenges): model input data types of challenges with EDAM #2557

Merged
merged 17 commits into from
Mar 16, 2024

Conversation

tschaffter
Copy link
Member

@tschaffter tschaffter commented Mar 8, 2024

Closes #2551

Changelog

  • model Challenge.inputDataTypes as an array of EdamData objects
  • remove the endpoint used to explore the collection of custom input data types
  • add README.md to the folder src/main/resources/db to share notes about how data are imported from CSV files

Future Work

  • Remove dummy input data type (another PR), keeping them in this PR for the sake of testing
  • Create a facet to explore used EDAM input data types

Preview

Search using the full-text search field

One challenge annotated with "Resource type" (http://edamontology.org/data_0005)

Searching with EDAM preferred name:

Screen Shot 2024-03-13 at 15 01 58

Searching with short EDAM class ID:

Screen Shot 2024-03-13 at 15 04 32

Searching with full EDAM class ID:

Screen Shot 2024-03-13 at 15 05 08

Challenge.inputDataTypes is now an array of EDAM Data objects

http://localhost:8085/v1/challenges/1

{
  "id": 1,
  "slug": "network-topology-and-parameter-inference",
  "name": "Network Topology and Parameter Inference",
  "headline": "Optimize methods to estimate biology model parameters",
  "description": "Participants are asked to develop and/or apply optimization methods, including the selection of the most informative experiments, to accurately estimate parameters and predict outcomes of perturbations in Systems Biology models.",
  "doi": "",
  "status": "completed",
  "platform": {
    "id": 1,
    "slug": "synapse",
    "name": "Synapse"
  },
  "websiteUrl": "https://www.synapse.org/#!Synapse:syn2821735",
  "avatarUrl": "",
  "incentives": [
    "publication"
  ],
  "submissionTypes": [
    "prediction_file"
  ],
  "inputDataTypes": [
    {
      "classId": "http://edamontology.org/data_0005",
      "preferredLabel": "Resource type"
    }
  ],
  "categories": [],
  "startDate": "2012-06-01",
  "endDate": "2012-10-01",
  "starredCount": 2,
  "operation": null,
  "createdAt": "2023-11-15T22:40:15Z",
  "updatedAt": "2024-03-04T18:31:19Z"
}

Example of challenge with input data type indexed in Elasticsearch

http://localhost:9200/openchallenges-challenge-000001/_search?q=(name:Network%20Topology%20and%20Parameter%20Inference)&size=1


Notes

ES indexed values may be a single objects or an array

Note

What is describe below is not an issue. It is simply how ES index data. The property returned by the OC Challenge Service will still always be an array.

The property Challenge.inputDataTypes takes an array as value when the challenge has multiple types. However, this property takes the value of a single object when its has a single type. This property must always be an array.

"id","challenge_id","edam_concept_id","created_at"
"1","1","1","2023-06-23 00:00:00"

http://localhost:9200/openchallenges-challenge-000001/_search?q=(name:Network%20Topology%20and%20Parameter%20Inference)&size=1

          "input_data_types": {
            "class_id": "http://edamontology.org/data_0005",
            "preferred_label": "Resource type"
          },

vs

"id","challenge_id","edam_concept_id","created_at"
"1","1","1","2023-06-23 00:00:00"
"2","1","2","2023-06-23 00:00:00"

http://localhost:9200/openchallenges-challenge-000001/_search?q=(name:Network%20Topology%20and%20Parameter%20Inference)&size=1

          "input_data_types": [
            {
              "class_id": "http://edamontology.org/data_0005",
              "preferred_label": "Resource type"
            },
            {
              "class_id": "http://edamontology.org/data_0007",
              "preferred_label": "Tool"
            }
          ],

cc: @vpchung @mdsage1 @gaiaandreoletti

@tschaffter tschaffter self-assigned this Mar 8, 2024
@tschaffter

This comment was marked as resolved.

Copy link
Member

@vpchung vpchung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my end - thanks!

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-app'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-challenge-service'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
41.8% Duplication on New Code

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-organization-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-image-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@tschaffter tschaffter merged commit 7e935e7 into Sage-Bionetworks:main Mar 16, 2024
12 checks passed
@tschaffter tschaffter deleted the input-data-type-edam branch March 16, 2024 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sonar-scan-approved-deprecated Ready for Sonar code analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Model input data types of challenges with EDAM
3 participants