Skip to content

Accept a per-sample DB bundle in the FASTA sample sheet - #27

Merged
jpalmer37 merged 4 commits into
mainfrom
feature/samplesheet-db-column
Oct 6, 2026
Merged

jpalmer37 merged 4 commits into
mainfrom
feature/samplesheet-db-column

Conversation

@jpalmer37

Copy link
Copy Markdown
Collaborator

A FASTA sample sheet can carry a DB column so one run mixes subtypes, each sample analysed against its own bundle. A blank cell, or no column, falls back to --db. auto-fluscan fills the column from the nf-flu run summary's subtype call.

Where to look:

  • modules/shared/sample_id.nf and database.nf: fasta_sample_channel, input_db_paths, resolve_dbs. Every bundle is validated at startup, and names must be unique.
  • workflows/paftools.nf and workflows/nextclade.nf: BLAST db, SnpEff dir, Nextclade batches, coordinate map, FluMut merge and provenance are now keyed by bundle.
  • makeblastdb, blastn and pipeline_provenance changed signature, so workflows/short-read.nf changed with them. Short-read stays single-bundle and rejects a DB column.

Breaking for any run, single-bundle included: run-level paths move to nextclade/<db>/<SEG>_output, nextclade/status/<db>/ and aggregate/reference_remap/<db>/. Per-sample paths and VCF names are unchanged, and fluscan-db reads none of the moved paths. New: aggregate/sample_ids.csv (input_id,sample_id,db). The manifest version is 1.1.0.

A separate commit fixes clean_sample_id so 25-7015--WLH25-1607 cleans to WLH25-1607 instead of -WLH25-1607.

Testing, run locally on macOS with a GNU shim: a mixed sheet (2 H5N1 on gsgd, 1 H1N1 on wisconsin588) against each subtype run alone with --db. Per-sample VCFs, QC, FluMut, watchlist outputs and coordinate maps were identical; only Nextclade's createdAt and GFF batch order differed. --fasta_input with --db is unchanged. Short-read was only checked through BLAST: on main it already fails at make_pileup.py, which #15 deleted but modules/short_read/alignment.nf still calls.

🤖 Generated with Claude Code

jpalmer37 and others added 4 commits October 6, 2026 14:42
25-7015--WLH25-1607 cleaned to -WLH25-1607; it now cleans to WLH25-1607.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An optional DB column gives each FASTA sample its own bundle, so one run can
mix subtypes. Run-level Nextclade and reference_remap outputs move under a
<db>/ directory, and aggregate/sample_ids.csv records each input ID's cleaned
sample_id and bundle. Manifest version 1.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jpalmer37
jpalmer37 merged commit b3c8ce1 into main Oct 6, 2026
1 check failed
@jpalmer37
jpalmer37 deleted the feature/samplesheet-db-column branch October 15, 2026 21:11
@jpalmer37
jpalmer37 restored the feature/samplesheet-db-column branch October 15, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant