feat(prepro): Add deacon#6876
Conversation
|
@claude review |
|
Claude finished @maverbiest's task in 4m 0s —— View job Claude finished reviewing
CI is green (preprocessing-tests, which includes ruff + pytest, passed), so this is a design/logic-level review rather than a lint/test-failure review. Findings1. Debug-only preview overrides are still in the diff 2. Possible race between starting the Deacon server and using it 3. Only 4. Duplicated “magic” Deacon index identifiers 5. Minor: raw-reads-pipeline coverage moved out of Nits
Overall this is solid, well-tested work — the new |
|
|
||
| # Preview only: run just the west-nile preprocessing pipeline while testing the deacon | ||
| # host-depletion step. Each enabled organism runs its own prepro pod and fetches the | ||
| # ~3.1Gi panhuman index, so disabling the rest keeps startup and memory manageable. | ||
| # Deep-merges `enabled: false` onto the base defaultOrganisms entries. | ||
| defaultOrganisms: | ||
| cchf: | ||
| enabled: false | ||
| cchf-multi-ref: | ||
| enabled: false | ||
| dummy-organism: | ||
| enabled: false | ||
| dummy-organism-with-files: | ||
| enabled: false | ||
| ebola-sudan: | ||
| enabled: false | ||
| enteroviruses: | ||
| enabled: false | ||
| not-aligned-organism: | ||
| enabled: false |
There was a problem hiding this comment.
This would disable all preview organisms but west nile, which we don't want.
So needs to be reverted before going on main
| "type": "string", | ||
| "description": "Minimizer used for nextclade sort (if require_nextclade_sort_match or if segments are to be assigned using nextclade sort)" | ||
| }, | ||
| "deacon_max_host_proportion": { |
There was a problem hiding this comment.
we probably need to configure two thresholds.
- Which percentage of reads are flagged
- How many bp are flagged
|
|
||
|
|
||
| @dataclass | ||
| class DeaconSummary: |
There was a problem hiding this comment.
its also important to know how many bp were flagged
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_deacon(monkeypatch): |
There was a problem hiding this comment.
It might actually be good to create a little deacon index and example raw reads for testing. We also do that with nextclade as I noticed if we dont actually run nextclade in tests we miss things
Partially resolves #6758
Summary
This PR incorporates Deacon into the preprocessing pipeline. Deacon is used to check submitted raw reads files for host contamination and rejects files where the proportion of raw reads above a threshold configured via
preprocessing.configFile.deacon_max_host_proportionin the values.yaml.Details
FileIdAndName->FileIdAndNameAndReadUrl(same as the backend type). This is because prepro now needs to download raw reads from S3 so it needs the URLspanhuman-1.k31w15.idxthat's needed for host depletionDeaconSummary. This information is used for deciding to reject a file or notManual testing
I monitored the prepro logs in Grafana to confirm that:
I also started a preview to check that:
Here, the first submission has file
ERR17072040.fastq.gz, which is just west-nile sequences. The second submission (with the error) has the same file where I added 10000 reads sourced from the human reference genome:When the sequence is released, the raw reads file is accessible on the sequence details page:
PR Checklist
- [ ] All necessary documentation has been adapted.-> will be added in #6760🚀 Preview: https://add-deacon.loculus.org