Add option for functional analysis to RawR#265
Conversation
timrozday-mgnify
commented
Feb 25, 2026
- Added a user option for functional analysis
- Checked that tests for functional profile results ingestion are in place (they already were)
There was a problem hiding this comment.
Thanks @timrozday-mgnify !
Could we have one more (can be very small) e2e test where functional annotation flag is False, and a change like generate_fake_rawreads_pipeline_results(make_functional: bool = False) just to ensure the whole flow finishes happily without pfam? E.g. to check import_completed_analyses etc continue to be happy with missing functions. It looks like the logical flow should currently be fine, but a small copy-paste test just to make sure the flow finishes successfully with taxonomies but no pfams in the Analysis.annotations would be a good safeguard against future regression.
| httpx_mock.add_response( | ||
| url=f"{EMG_CONFIG.ena.portal_search_api}?" | ||
| f"result=read_run" | ||
| f"&query=%22%28%28study_accession={study_accession}+OR+secondary_study_accession={study_accession}%29%20AND%20library_strategy=WGS%29%22" |
There was a problem hiding this comment.
We need to find a better way to mock these things.. any minor changes and this breaks.
There was a problem hiding this comment.
True – I think the best place for that would be a helper in v3 of ena-api-handler... added to JIRA as subtask EMG-9400.
mberacochea
left a comment
There was a problem hiding this comment.
It looks good.. one thing I'm not sure about is that on the tests the httpx mocks are optional