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

EVA-3732 - New script to help find children that match the definition of a new term #452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tcezard
Copy link
Member

@tcezard tcezard commented Jan 22, 2025

No description provided.

@tcezard tcezard requested a review from apriltuesday January 22, 2025 23:06
Copy link
Contributor

@apriltuesday apriltuesday left a comment

Choose a reason for hiding this comment

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

Looks good, my comments are just nitpicks. Would be good to mention use of this script in the manual curation SOP, but that can be done later.


def search_in(keywords, text):
return set((keyword for keyword in keywords if keyword in text))

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

& same elsewhere


args = parser.parse_args()


Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change


def query_and_depaginate(url):
json_response = json_request(url)
results = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a defaultdict(list)

results = query_and_depaginate(url)
for term in results['terms']:
if term['ontology_prefix'] == db:
results2 = query_and_depaginate(term['_links']['children']['href'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Could maybe call this children_results or something similar

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