-
Notifications
You must be signed in to change notification settings - Fork 11
feat(prepro): Add deacon #6876
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
base: raw-reads
Are you sure you want to change the base?
feat(prepro): Add deacon #6876
Changes from all commits
e3ab8bc
3e6b2ba
f05471a
12e5d7e
6a5b127
06278f9
9f90c06
319db4d
4618873
f6f1eed
b7c1890
0e1345d
f468c6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,7 +142,7 @@ resources: | |
| memory: "200Mi" | ||
| cpu: "10m" | ||
| limits: | ||
| memory: "3Gi" | ||
| memory: "8Gi" | ||
| minio: | ||
| requests: | ||
| memory: "250Mi" | ||
|
|
@@ -156,3 +156,23 @@ defaultResources: | |
| limits: | ||
| memory: "1Gi" | ||
| cpu: "20m" | ||
|
|
||
| # 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 | ||
|
Comment on lines
+159
to
+178
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would disable all preview organisms but west nile, which we don't want. So needs to be reverted before going on main |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,4 @@ dependencies: | |
| - pytest=9.1.1 | ||
| - pydantic=2.13.4 | ||
| - diamond=2.2.2 | ||
| - deacon=0.15.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import json | ||
| from collections.abc import Iterable | ||
| from dataclasses import dataclass, field | ||
| from dataclasses import dataclass, field, fields | ||
| from enum import StrEnum, unique | ||
| from typing import Any, Final | ||
| from typing import Any, Final, Self | ||
|
|
||
| AccessionVersion = str | ||
| GeneName = str | ||
|
|
@@ -82,9 +83,10 @@ def from_single(cls, name: str, type, message: str): | |
|
|
||
|
|
||
| @dataclass | ||
| class FileIdAndName: | ||
| class FileIdAndNameAndReadUrl: | ||
| fileId: str # noqa: N815 | ||
| name: str | ||
| url: str | None = None | ||
|
|
||
|
|
||
| @dataclass | ||
|
|
@@ -95,7 +97,7 @@ class UnprocessedData: | |
| submissionId: str # noqa: N815 | ||
| metadata: InputMetadata | ||
| unalignedNucleotideSequences: dict[SequenceName, NucleotideSequence | None] # noqa: N815 | ||
| files: dict[FileCategory, list[FileIdAndName]] | None | ||
| files: dict[FileCategory, list[FileIdAndNameAndReadUrl]] | None | ||
|
|
||
|
|
||
| @dataclass | ||
|
|
@@ -111,7 +113,7 @@ class UnprocessedEntry: | |
| @dataclass | ||
| class UnprocessedAfterNextclade: | ||
| inputMetadata: InputMetadata # noqa: N815 | ||
| files: dict[FileCategory, list[FileIdAndName]] | None | ||
| files: dict[FileCategory, list[FileIdAndNameAndReadUrl]] | None | ||
| # Derived metadata produced by Nextclade | ||
| nextcladeMetadata: dict[SequenceName, Any] | None # noqa: N815 | ||
| unalignedNucleotideSequences: dict[SequenceName, NucleotideSequence | None] # noqa: N815 | ||
|
|
@@ -127,7 +129,7 @@ class UnprocessedAfterNextclade: | |
| @dataclass | ||
| class ProcessedData: | ||
| metadata: ProcessedMetadata | ||
| files: dict[FileCategory, list[FileIdAndName]] | None | ||
| files: dict[FileCategory, list[FileIdAndNameAndReadUrl]] | None | ||
| unalignedNucleotideSequences: dict[SequenceName, Any] # noqa: N815 | ||
| alignedNucleotideSequences: dict[SequenceName, Any] # noqa: N815 | ||
| nucleotideInsertions: dict[SequenceName, Any] # noqa: N815 | ||
|
|
@@ -265,3 +267,19 @@ class MoleculeType(StrEnum): | |
| class Topology(StrEnum): | ||
| LINEAR = "linear" | ||
| CIRCULAR = "circular" | ||
|
|
||
|
|
||
| @dataclass | ||
| class DeaconSummary: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its also important to know how many bp were flagged |
||
| time: float | ||
| seqs_in: int | ||
| seqs_out: int | ||
| seqs_removed: int | ||
| seqs_removed_proportion: float | ||
|
|
||
| @classmethod | ||
| def from_json(cls, json_path: str) -> Self: | ||
| with open(json_path, encoding="utf-8") as f: | ||
| data = json.load(f) | ||
| wanted = {f.name for f in fields(cls)} | ||
| return cls(**{k: v for k, v in data.items() if k in wanted}) | ||
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.
we probably need to configure two thresholds.