-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
& same elsewhere
|
||
args = parser.parse_args() | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
def query_and_depaginate(url): | ||
json_response = json_request(url) | ||
results = {} |
There was a problem hiding this comment.
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']) |
There was a problem hiding this comment.
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
No description provided.