Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .envrc

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
!pixi.lock
!pyproject.toml
!uv.lock
!.envrc
!flake.nix
!mise.lock
!mise.toml

# workflows
!/workflows
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ENV PATH="${HOME}/.pixi/bin:${PATH}"
# environment, so skip those direct packages and their dependency subtrees.
RUN cd $HOME && \
pixi install --frozen \
--skip-with-deps apptainer \
--skip apptainer \
--skip-with-deps rust-script \
--skip-with-deps rust \
--skip-with-deps compilers \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ Then generate a samplesheet from that accession list:
nvd samplesheet generate --from-sra accessions.txt --platform illumina --output samplesheet.csv
```

NVD decodes each SRA run as a stream through target enrichment rather than materializing decoded raw FASTQ files. Raw-read FastQC therefore runs only for local FASTQ inputs; the `skip_fastqc` setting controls those local tasks. SRA reads rejoin local reads immediately after target enrichment and receive the same subsequent preprocessing.

If you want to inspect what NVD would write before touching the filesystem, use dry-run mode:

```bash
Expand Down
20 changes: 0 additions & 20 deletions bin/build_sequence_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,22 +181,6 @@ def megablast_partition_rows(path: Path) -> list[LedgerRow]:
return rows


def blast_filter_rows(path: Path) -> list[LedgerRow]:
return [
LedgerRow(
sample_id=source["sample_id"],
stage=source["stage"],
input_class=source["query_class"],
output_class="virus_only_hits",
decision="retain",
reason="viral_taxonomy_match",
sequences_in=source["queries_in"],
sequences_out=source["queries_retained"],
)
for source in read_tsv(path)
]


def rows_for_input(path: Path) -> list[LedgerRow]:
name = path.name
adapters = (
Expand All @@ -206,10 +190,6 @@ def rows_for_input(path: Path) -> list[LedgerRow]:
(("_mapped_counts.txt",), mapback_rows),
((".blast_query_batches.tsv",), query_batch_rows),
((".megablast_query_partition.tsv",), megablast_partition_rows),
(
(".megablast_query_filtering.tsv", ".blastn_query_filtering.tsv"),
blast_filter_rows,
),
)
for suffixes, adapter in adapters:
if name.endswith(suffixes):
Expand Down
67 changes: 0 additions & 67 deletions bin/filter_non_virus_blast_nodes.py

This file was deleted.

2 changes: 1 addition & 1 deletion bin/finalize_blast_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def main(argv: list[str] | None = None) -> None:
parser.add_argument(
"--virus-index-version",
required=True,
help="STAT k-mer database version used for virus enrichment index",
help="Target-enrichment index version",
)
parser.add_argument(
"--run-id",
Expand Down
7 changes: 7 additions & 0 deletions bin/stream_fastqs_to_deacon.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class DeaconStreamConfig:
rel_threshold: float
deplete: bool
deacon_bin: str
check_pairs: bool = False


@dataclass(frozen=True)
Expand All @@ -66,6 +67,7 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
parser.add_argument("--abs-threshold", type=int, default=1)
parser.add_argument("--rel-threshold", type=float, default=0.0)
parser.add_argument("--deplete", action="store_true")
parser.add_argument("--check-pairs", action="store_true")
parser.add_argument("--deacon-bin", default="deacon")
return parser.parse_args(argv)

Expand Down Expand Up @@ -94,6 +96,7 @@ def config_from_args(args: argparse.Namespace) -> DeaconStreamConfig:
rel_threshold=args.rel_threshold,
deplete=args.deplete,
deacon_bin=args.deacon_bin,
check_pairs=args.check_pairs,
)


Expand Down Expand Up @@ -144,6 +147,8 @@ def validate_config(
if single == paired:
message = "Provide either --reads-list for single-end input or both --r1-list and --r2-list for paired input"
raise StreamError(message)
if config.check_pairs and not paired:
raise StreamError("check-pairs requires paired input")
if single:
validate_files("reads", config.reads)
validate_sample_compression(config.reads)
Expand Down Expand Up @@ -204,9 +209,11 @@ def stream_files_to_fifo(


def deacon_command(config: DeaconStreamConfig, inputs: tuple[Path, ...]) -> list[str]:
pair_args = ["--check-pairs"] if config.check_pairs and config.r1 else []
command = [
config.deacon_bin,
"filter",
*pair_args,
"--threads",
str(config.threads),
"--abs-threshold",
Expand Down
67 changes: 0 additions & 67 deletions bin/summarize_blast_filtering.py

This file was deleted.

55 changes: 0 additions & 55 deletions bin/test_filter_non_virus_blast_nodes.py

This file was deleted.

Loading
Loading