Changelog¶
All notable changes to sylphd are documented here. The format follows
Keep a Changelog, and the project uses
semantic versioning.
0.10.0 - 2026-11-28¶
Changed¶
- omnitax 0.2 (
omnitax>=0.2,<0.3, alsoomnitax[server]). Its files are never in WAL mode any more (no-wal/-shmbeside them); a file built with omnitax 0.1.1 or older is in WAL mode and is refused, andserve --taxonomy-db/setup --taxonomy-dbpass omnitax's message on, which gives the one-line conversion command (python -c "import sqlite3,sys; sqlite3.connect(sys.argv[1]).execute('PRAGMA journal_mode=DELETE')" FILE; nothing is lost). - The nearest NCBI taxon uses omnitax 0.2's GTDB → NCBI defaults, now passed explicitly: the abstention guard
min_informative=0.3(it was 0.2) andcap=True(a clade is never answered by something finer than its own rank: a genus clade is no longer placed at a species), with the threshold 0.8. On omnitax's benchmark strict precision leaving a species out is 82.24 % against 80.01 %. The cap ladder is the nearest ranks (GTDB's seven plus the kingdom). Rebuild a metadata database withsetup --taxonomy-dbto get the new placements.
0.9.0 - 2026-11-27¶
Changed (breaking)¶
- Taxonomies come from omnitax. sylphd no longer has a taxonomy
surface of its own. Removed: the commands
sylphd taxdbandsylphd taxonomy, the modulessylphd.ncbitax,sylphd.taxdb,sylphd.client(the Python transport, which only they used),sylphd.ncbi_taxonomyandsylphd.ncbi_nearest, and thetaxonomyextra. Build the file withomnitax build -o taxonomies.sqlite ncbi+assemblies+gtdb:232 gtdb:232(old taxdb files do not load: rebuild) and look taxa up withomnitax --url https://HOST/taxonomy ...oromnitax.connect(url="https://HOST/taxonomy"). sylphd serve --taxonomy-db FILEmounts omnitax's API at/taxonomy(/taxonomy/taxonomies,/taxonomy/ncbi/nodes, ...; no more/taxonomy/info,/lineage,/lookupwith taxids as integers).--taxonomy-rate-limitcounts every request under/taxonomy, a privileged token skips it,--require-tokencovers it./infotaxonomyis{"enabled", "mount", "api_version", "taxonomies": [{label, kind, version, nodes, genomes, built, fuzzy}], "rate_limit"}(it used to holdsource,source_date,taxa,fuzzy). omnitax's own log goes to theomnitaxlogger, shown at--log-level.sylphd setup --ncbi-taxonomyis--taxonomy-db FILE: it reads the same omnitax file instead of downloading NCBI's taxdump and assembly summaries on every run. The assembly lookup is omnitax's (the accession, else its version, else the only stored version of its number;GCA_andGCF_stay different genomes), so a versioned key whose version is missing is found as long as the file has one version of its number. The per-sourcencbicounts haveambiguous(several genomes) where they hadno_lineage. The metadata format is unchanged (still 3).- The nearest NCBI taxon is placed by omnitax's
translate: more cautious, more precise. A GTDB clade is translated into NCBI through the shared genomes: the deepest node that more than 80 % of the votes have as ancestor-or-self (it was a bare majority, 0.5), every GTDB leaf votes once (its vote split among its genomes; it was one vote per genome, so a species of many genomes decided its genus), and a placeholder vote (Xanthomonadaceae bacterium) abstains below its own rank instead of counting against a genus it does not contradict. On omnitax's benchmark of known genomes the genus is placed with 95.6 % precision and 65.8 % recall, against 86.9 % and 67.8 % for the old rule.membersis the number of votes that counted at the answer's rank (abstentions excluded), and the nearest ranks are GTDB's seven plus NCBI's kingdom (Bacillati, Pseudomonadati, ...), where clades that NCBI splits across phyla still agree. Rebuild a metadata file withsylphd setup --update --taxonomy-db FILEto get the new placements. - The base install has no dependencies (it was
httpx);httpxandomnitax[server]are insylphd[server], which is whatserve,setupanddownloadneed (the basesylphdsays so when one is missing).
Added¶
sylphd.taxonomy(name=None, *, url, socket, token, token_file, timeout, retries)returns anomnitax.Taxonomyof a sylphd server's/taxonomy:sylphd.taxonomy("ncbi"). The server and the token are found as the command line finds them ($SYLPHD_URL,$SYLPHD_SOCKET, the default socket;$SYLPHD_TOKEN).omnitaxis now in theclientextra. The modulesylphd.taxonomy(profile aggregation) is renamedsylphd.taxprofileto make room for the function.sylphd'sapi_versioncovers the result documents and the/infofields clients read; the/infotaxonomysection is informational (omnitax's ownapi_versioncovers/taxonomy).
0.8.0 - 2026-11-25¶
Changed (breaking)¶
- The HTTP API returns JSON documents (
api_version1, also inGET /info; a client refuses a server or saved document of another version with "update sylphd" or "the server predates this sylphd")./profile,/query,/assemblyand/contigsanswer with{"api_version", "params", "table": {"columns", "data"}, ...}: one table per response in pandas'orient="split"layout (pandas.DataFrame(**doc["table"])), every row with itsSample_file. /profileand/query:sampleslists every sample sent, withkmers,mean_read_lengthandpairedfrom its sketch andreads/basesas counted by the client (nullwhen unknown, e.g. a.sylspupload), so a sample without hits is still visible; the client sends its counts asparams.samples. Rows carrygenome_idafteraccession(as/assemblyand/contigsrows always did; also in the TSV, after sylph's columns),True_covreplacesEff_covunder--estimate-unknown, andLambda_statusis its own column (the TSV still printsHIGH/LOWinEff_lambda). The species caveats come from the server (caveats)./assemblykeepsquery,assignment,closestandthresholds; its hits are the table, withtaxonandgtdb_speciesnow computed by the server./contigsreturns the flat per-hit table,contigs(assignment, closest and consensus per contig) andsummary./messagesitems have aplain(markdown-free) text; a requested field that collides with a fixed column of the table is a 400.- The query commands are a native binary now.
sylphd info,profile,query,assemblyand the newrenderrun insylphd-client, which ships as the platform wheelsylphd-bin(py3-none-<platform>, like ruff and uv). Thesylphdcommand stays: it runsserve,setup,download,taxdb,taxonomy,taxmatrixanddiffin Python and hands every other invocation to the binary withos.execv(a subprocess with the exit code on Windows), so flags, exit codes, stdin, stdout and signals are the command line's, unchanged. sylphd[client]no longer needs a compiler. It issylphd-binand nothing else: nopysylph, nodnaio, no Rust toolchain, nocmake, and no Python version tied to an extension (the binary wheel serves every Python 3).sylphd[server]adds the server's packages (pysylph,dnaio,starlette,uvicorn,python-multipart) to the same binary. Release archives carry the baresylphd-clientfor machines without Python.- No Python library for queries.
SylphClient's sketching and query methods (profile_reads,query_reads,identify_assembly,classify_contigs,profile,query,assembly,assembly_sketch,contigs,sketch_parameters,database_info,messages) andsylphd.per_contig_client(PerContigRun,PerContigOptions) are gone, as issylphd.sketching(sketch_sample,sketch_assembly,sketch_contigs,load_sketch,build_sample_inputs). Use the command line throughsylphd.run(*args) -> dict(sylphd.run("profile", "reads.fq.gz"),sylphd.run("assembly", "mag.fna", "--per-contig")). Sample names and their checks moved tosylphd/samples.py(the server still owns them). sylphd.clientis transport only (connect,SylphClient.taxonomy/health) forsylphd.ncbitaxandsylphd taxonomy; the address, token and retry rules are mirrored inrust/sylphd-clientand covered by one shared table of cases.- Rendering left Python.
protocol.rows_to_tsv/rows_to_tsv_lines,format_value,format_rowand theinfoprinters are deleted: the client renders tables, summaries and caveats, from the server's JSON document, in one implementation shared with the web app (sylphd-core). The output of a run depends on the client version, not the server's.sylphd infostill prints the same text, now rendered by the client.
Added¶
sylphd taxmatrix [--value relative|sequence|ani|coverage] [--taxonomy NAME] [-o FILE] FILES...: offline command that merges.sylphmpafiles (as written bysylph-tax taxproforsylphd profile --taxprof) and saved/profileJSON documents into one wide clade × sample TSV table, matchingsylph-tax merge. Standard library only (dispatched directly inentry.py, likesylphd diff), so it works in the base install withoutpysylphand can merge samples across separate profiling runs.sylphd render [FILE]: renders a document saved with--jsonas the table the command line would have printed, offline (no server, no sketching). It recognises profile/query documents, assembly documents and per-contig run documents.sylphd.run(*args) -> dict: runssylphd-clientwith--jsonand returns the server's document (pandas.DataFrame(**doc["table"])loads the table); raisesClientRunErrorwith the exit code and stderr on failure.sylphd-binwheels and standalonesylphd-clientarchives for manylinux and musllinux x86_64/aarch64, macOS arm64/x86_64 and Windows x86_64, published with every release.$SYLPHD_CLIENT_BINoverrides the binary thesylphdcommand runs;SYLPHD_REQUIRE_CLIENT_BIN=1turns the tests' "binary missing" skips into failures (CI sets it).- CI (
.github/workflows/ci.yml):cargo test --workspaceincluding the pysylph equality tests,cargo clippy -D warnings, and the Python suite with the binary built byuv sync. sylphd profile/queryname every sample without hits on stderr, with its k-mer and read counts (sylphd: no hits for R1 (12,345 k-mers, 8,000 reads)).- The web page renders through the same code as the command line (
sylphd-corecompiled to WebAssembly: TSV downloads, per-contig batching and merging,.sylspchecks) and checks the server'sapi_versionbefore sketching.
Removed¶
sylphd profile --taxmatrixand--taxmatrix-value: replaced by the standalonesylphd taxmatrixcommand.- The Python renderer and its regeneration script.
scripts/regen-render-golden.pyneeded the Python renderers; the committedrust/sylphd-core/tests/data/*_golden.jsonare the specification of the TSV output now (seerust/README.md).
[0.7.0] - 2026-11-21¶
Added¶
- A
sylphdskill for coding agents (skills/sylphd/SKILL.md), installed withgh skill install Abrinca/sylphd sylphd --agent claude-code --scope user. It picks assembly, per-contig or reads mode from the input, checks the server and its messages first, writes the full output next to the input and summarises it. A guide ("Coding agents") explains it, including that the message acknowledgement is a rule for the agent, not enforced. A test checks that every option the skill names exists in the CLI. sylphd infoshows the operator's messages (all levels, plain text), andinfo --jsoncarries them in amessageskey.sylphd diff A B: are two outputs equivalent? Comparessylph profile/queryTSVs, orsylph-tax.sylphmpafiles (or directories of them), with sylphd's: the same genomes or clades, values equal within the printed rounding, and rows with equal values in any order. sylphd works at full precision while sylph prints rounded values and sylph-tax sums those, so the same run is never byte-identical; the order of exact ties also differs (stock sylph's own varies between runs with several threads). Exit status 0, 1 (not equivalent) or 2 (usage or format error);--json,--tolerance,--max-differences. Standard library only, so it works in the base install. Tests use it for real GlobDB output and for exact ties against the sylph binary. The documentation now says "equivalent to sylph 1.0.0 / sylph-tax v1.9.2" for thetaxprofile and the TSV rows (whose text is still identical) instead of byte-identical.- The sylph-tax golden script and live test write the TSV with sylph's own number formatting, as sylph-tax really reads it.
Fixed¶
- The client extra works on its own.
sylphd[client]failed on every command,infoincluded, because the command line imported the server (starlette, uvicorn) at start-up. The server is now imported only bysylphd serve, and a test runs a client command with the server packages blocked. - Web: Reads mode no longer stays on "Uploading the sketch…" while the server profiles. The
progress switched to Profiling only on the upload's
loadevent, which Firefox fires over HTTP/2 (the public server behind Caddy) only once the response starts, i.e. after profiling. It now also switches when the progress events report every byte sent.
0.6.1 - 2026-11-21¶
Fixed¶
- GlobDB hits are GTDB taxonomy. A hit from a
GlobDB_*taxonomy source (whose lineages are GTDB-Tk'sd__…;s__…,GlobDB_r232being GTDB r232) was treated like a foreign taxonomy, sosylphd assemblyagainst the public server saidassigned to Mycoplasmoides genitalium at the 95 % species thresholdand warned that the threshold is a heuristic.GTDB_*andGlobDB_*are now one family (is_gtdb_taxonomy_source):assigned to species …, no caveat, relations computed against GTDB hits (any release, as before), and the web page shows the "GTDB species" column and GTDB wording for them. Genome ids are unchanged: a GlobDB hit is still named by itsMOTU…/SPIREOTU…key.
0.6.0 - 2026-11-21¶
Changed¶
- Data licence texts. The terms page and
docs/project/terms.mdstate that results contain GlobDB and GTDB data, both CC BY-SA 4.0, to be cited and shared under the same licence if published or redistributed, and that your own sequences and the numbers (ANI, abundances) are yours.deploy/sylphd.servicenow defaultsSYLPH_METAtometa-globdb-r232.sqlite, the namedeploy/README.mdandsite.env.exampleuse (it named an unrelatedmeta-r232-reps-v3.sqlite). - The public server switches from GTDB r232 to GlobDB r232 (346,232 genomes, GTDB taxonomy), with UHGV and RefSeq fungi (32.2 GB in total). The web page, the README and the docs say so: the "idea" figure and size table are redrawn to scale (GlobDB 31.19 GB, 432× the 74.5 MB sketch), the web "How to cite" list and the terms page credit GlobDB (CC BY-SA 4.0), and the GTDB entry is worded as the taxonomy citation.
- GlobDB genomes that are not in GTDB (
MOTU40_…,SPIREOTU_…,CRBC_…) are named by their ID without a link in the reads table (they have no GTDB, NCBI or GlobDB genome page), and the taxonomy chart offers a GTDB link for GlobDB clades except for their catalogue-named species. GTDB genomes in GlobDB keep their NCBI and GTDB links. - TSV output now matches sylph's, byte for byte. This changes the TSV (not the JSON). Where
sylphdwrote an empty cell, it now writes what sylph 1.0.0 writes:HIGHorLOWinEff_lambdawhen lambda cannot be estimated (taken fromLambda_status),NA-NAinANI_5-95_percentileandLambda_5-95_percentilewhen there is no interval, and, for a sketch without read statistics under-u,infinTrue_covandNaNin the abundances.Adjusted_ANIis capped at 100 as in sylph. Scripts that tested for empty cells need updating. Metadata columns still use empty cells for missing values. Under--no-adjustthe ANI interval is printed as stock sylph prints it (see the API change below). - API change:
no_adjustkeeps the ANI interval. Withno_adjust,ANI_5-95_percentilein the/queryand/profileJSON used to benull; it is now sylph's interval of the adjusted estimate (as in stock sylph and pysylph), so the CLI TSV matchessylph --no-adjustbyte for byte. The web app still does not show it. Clients that relied on thenullmust ignore the column themselves. - Dependency refresh.
uv lock --upgrademoves anyio 4.15.1 → 4.16.0, click 8.5.0 → 8.5.1, dnaio 1.2.4 → 1.2.5, isal 1.8.0 → 1.9.1, python-multipart 0.0.32 → 0.0.34 and zlib-ng 1.0.0 → 1.1.0.pysylphstays on themulti-dbcommit pinned inuv.lock, so no Rust rebuild is involved. No source changes; the test suite is unchanged at 896 passed, 6 skipped.
Added¶
- Operator messages:
sylphd serve --messages FILE. FILE is JSON, a list of{"level": "info"|"warning"|"danger", "title", "message"}(Markdown message; at most 20 messages, 120-character titles, 2000-character messages).GET /messagesreturns{"messages": [...]}(empty without the option), open like/info, also with--require-token, and listed in/infoendpoints. The file is re-read when it changes; a bad version keeps the last good list and logs a warning, a bad file at startup is an error. The web page shows the messages under the server status bar (infoblue andwarningamber with a × that is remembered in localStorage under a hash of level, title and message,dangerred and not dismissible; rendered with the same sanitising as the about text; read with every successful/infocheck; a server without the endpoint shows nothing).sylphd profile,queryandassemblyprint thewarninganddangermessages on stderr once per run (notinfo;-qwhere it exists); an absent endpoint, timeout (3 s) or error is ignored.deploy/messages.example.jsonholds the data-licence and terms notes of the public instance. /inforeports a data licence per database:databases[].licenceis{"name": "CC BY-SA 4.0", "url": ...}ornull. It comes from the download catalogue, matched on the file name: the GTDB and GlobDB files are CC BY-SA 4.0, everything else isnull(not known).- A compatibility test against the real
sylphbinary (tests/test_sylph_compat.py, run withSYLPH_BIN=/path/to/sylph uv run pytest tests/test_sylph_compat.py; skipped when no binary is found). It comparesquery,profileandprofile -uTSV byte for byte on shared sylph-made sketches, and, separately, pysylph's sketches againstsylph sketch. An optional CI job runs it against bioconda's sylph. - Web: all options visible, and an ANI slider in Reads mode. The "Options" section of Reads mode and the "Consensus options" of the per-contig assembly form are no longer collapsed: every field is shown in a compact row (the consensus fields now share the per-contig row). Reads mode has a small slider (90 to 95, whole numbers) next to the minimum ANI input; the number input stays the value, so any number can still be typed, and the slider then shows the nearest position.
- GlobDB r232, and genomes named without an assembly version. The catalogue lists
globdb_r232_sylph_v2_c200.syl2db(346,232 genomes; the publisher has no checksum, so the entry carries an MD5 computed from a complete download, whichdownload --verifychecks) with the sylph-tax sourceGlobDB_r232(346,233 keys:QXLSG_01327is in no genome). GlobDB names its genomesGCA_041167105and its contigsGCA_041167105_000000000001, with no.Nanywhere, while GTDB's metadata is keyedGCA_041167105.1. An unversionedGCA_/GCF_accession now resolves to the metadata row of its base when exactly one version of that base counts (GTDB's row first, then an NCBI enrichment row); two versions are ambiguous and resolve to nothing — never a guess. This applies to the hit-level metadata lookup (genomes/GCA_041167105.fa.gzfinds its GTDB row and realncbi_taxid), the "covered by GTDB" check of--ncbi-taxonomy,--update's pruning of enrichment rows and the key overlap between a source and the virtual GTDB source.--ncbi-taxonomyalso accepts an unversioned key GTDB does not cover, matching the single version in NCBI's assembly summary. All 199,923 GlobDBGCA_/GCF_keys get GTDB metadata and their NCBI taxids, andsetupreports the GlobDB_r232 ↔ GTDB_r232 overlap (199,923 keys). - The nearest NCBI taxon of genomes with no NCBI record.
setup --ncbi-taxonomynow also places a key that has a GTDB-style lineage but no NCBI taxid (a GlobDB MAG,MOTU40_002958): for each GTDB clade from the deepest rank up, its GTDB members' NCBI taxids vote, and the deepest NCBI node that strictly more than half of them have as ancestor-or-self (usingnodes.dmp, followingmerged.dmp) is the nearest taxon. The majority rule replaces a strict LCA, which one misclassified genome would drag to the root. That raw node is reported as it is, even when it is a species NCBI only names informally (Clostridia bacterium, uncultured Collinsella sp.) — it is what the profile and the web view place a hit at. Next to it the metadata says which ancestor NCBI names formally, fromnodes.dmp'sspecified_species(field 16; a structural flag, not a pattern on names):ncbi_nearest_formal_taxid,ncbi_nearest_formal_rankandncbi_nearest_formal_nameare the class Clostridia for Clostridia bacterium, the genus Collinsella for uncultured Collinsella sp., and the raw taxon itself for a binomial. Stored asncbi_nearest_taxid,ncbi_nearest_rank,ncbi_nearest_name,ncbi_nearest_clade,ncbi_nearest_lineageand the threeformal_*columns — always apart fromncbi_taxid, which stays an assembly's real taxid ornull— in the newtaxonomy_nearestandncbi_nearest_taxontables, and reported per source (keys,assigned,informal, and the counts per raw rank) bysetup,sylphd infoandGET /infoasmetadata.taxonomy_sources[].ncbi_nearest. Thencbiprofile and the web NCBI view use the raw node as a fallback, and the web names the formal taxon too when the two differ (Clostridia bacterium (nearest NCBI taxon; nearest formally named: class Clostridia)); the/profileJSON marks the strain row with anearestobject. Profiles of a file without nearest taxa are byte for byte unchanged. No format bump: the tables are optional, format 3 stays, and an older file reads exactly as before. - Documentation for the GlobDB switch. A new GlobDB evaluation
page (reads classified against GTDB, the minimum-ANI sweep, memory under hard limits, parity with
stock sylph) with its scripts in
scripts/benchmarks/globdb/; the README and the docs home page tell the idea with to-scale diagrams and animated demos of Reads and Assembly mode;deploy/has the GlobDB configuration (8 GiB of RAM recommended, 7.5 GiB the lowest limit that starts; the GTDB one needs 6 and 5.25) next to the GTDB one, with the metadata build; the docs describe the TSV placeholders, thencbi_nearest_*columns and that/info's per-databasegtdbflag means "the genome names are GTDB accessions", which is also true for GlobDB.
0.5.1 - 2026-11-13¶
Added¶
- The Python client sketches for you.
client.profile_reads(reads)(a path, an(r1, r2)pair, a.sylspor aSampleInput),client.query_reads(reads),client.identify_assembly(path)andclient.classify_contigs(path)sketch on this machine with the server'scandk, send only the sketch and return the server's result (classify_contigsaPerContigRun). Alsoclient.sketch_parameters()andclient.database_info()(cached). Without pysylph they raise anImportErrorthat namessylphd[client]. See the Python client guide. - Taxid autocomplete.
/taxonomy/search(andTaxonomy.search,sylphd taxonomy --search) with a query of digits only completes the taxid: the exact id, then the ids that start with the digits, shorter first; a merged taxid answers with its replacement. Hits keep the name-search shape (name_classis"taxid"or"merged taxid"). - Wrong tokens are reported; private servers; tokens in the web page. A response to a request that
carried a bearer token now has
X-Token-Valid: true|false(andGET /infosaysaccess.token_valid), so the command line and the Python client warn once (sylphd: warning: ... does not accept this access token) instead of silently falling back to the rate limit.serve --require-token(with--privileged-token-file) refuses everything except/,/healthand/infowith401unless the token is valid;/inforeportsaccess.token_required. CORS now allows theAuthorizationheader and exposesX-Token-Valid. The web page has a key button in the server bar: the token is kept inlocalStorageper server, sent only to that server (and only over https or to localhost), flagged when rejected, and the form opens by itself on a server that requires one.
0.5.0 - 2026-11-13¶
Added¶
-
Privileged access without a rate limit.
sylphd serve --privileged-token-file PATHreads bearer tokens (one per line,#comments allowed, at least 16 characters; only SHA-256 digests are kept in memory). A request withAuthorization: Bearer <token>skips--rate-limitand is not counted in the client's bucket.--max-jobs,--max-queueand the size limits still apply. Clients send the token with--token-file PATHor$SYLPHD_TOKEN, andconnect(..., token=...); the client refuses to send it over plainhttp://to a remote host. -
The NCBI taxonomy as a service and a library.
sylphd taxdb build -o taxdump.sqliteturns NCBI'snew_taxdump.tar.gzinto one indexed SQLite file (3 million taxa, about 1 GB, 30 s): every node with its genetic code, mitochondrial/plastid/hydrogenosome codes, division and flags, every name with its class, merged and deleted taxids, and the genetic code and division tables.sylphd serve --taxonomy-db FILEserves it at/taxonomy/{info,nodes,lineage,names,children,lookup,search}(batch JSON, exact names, prefix search and typo-tolerant fuzzy search in tens of milliseconds);--taxonomy-rate-limitlimits it apart from the job endpoints, a privileged token lifts it, and a rebuilt file is picked up without a restart.from sylphd.ncbitax import TaxonomygivesTaxonobjects (.name,.rank,.genetic_code_id,.parent,.children(),.lineage(),.at_rank(), ...) from a socket, a URL or a file, with the same answers from each and without pysylph or starlette installed.sylphd taxonomylooks taxa up on the command line. See the NCBI taxonomy guide.
Changed¶
- The base install is light: pick
sylphd[server],sylphd[client]orsylphd[taxonomy]. Plainsylphdnow depends onhttpxonly, enough forsylphd.ncbitaxandsylphd.taxdb.sylphd[client]adds pysylph and dnaio (the command line, local sketching);sylphd[server]adds the web server on top. Upgrading a server or a client means installing the extra: the Docker image,deploy/update.shand the install docs already do. Without it,sylphdprints which extra to install instead of a traceback. The host's installedsylphd-updatemust be refreshed (setup-server.sh) before updating to this release.
Fixed¶
- No traceback on
SIGTERMwith--socket. The server's SIGTERM handler raisedSystemExitinside uvicorn's still-running event loop, so asyncio cancelled the lifespan task and Starlette logged aCancelledErrortraceback on shutdown. The handler now removes the socket and ends the process with the default SIGTERM action.
0.4.2 - 2026-11-10¶
Added¶
- A container image,
abrincagenomics/sylphd. A bareDockerfile(noCMD,ENTRYPOINT,EXPOSEorUSER) installs the release wheels intoghcr.io/astral-sh/uv:python3.14-trixie-slim, so nothing is compiled. The release workflow builds it for linux/amd64 and linux/arm64 and pushesX.Y.Zandlateston every tag;workflow_dispatchbuilds it without pushing.
Changed¶
deploy/sylphd.serviceis shorter and caps memory.MemoryMax=8G,MemorySwapMax=0andRestart=always: a request that needs too much memory kills sylphd, which restarts in seconds, instead of freezing the host (a large sketch at 85 % minimum ANI did).OOMScoreAdjust=-200is gone, the hardening is cut to the lines that matter, and the comments live in the docs.
0.4.1 - 2026-11-09¶
Added¶
sylphd setup --ncbi-taxonomy: an NCBI lineage for the genomes of sylph-tax sources. GTDB's metadata has no row for aFungiRefSeq-latestgenome (keyGCF_000002495.2_MG8), so the NCBI taxonomy view, the NCBI Taxonomy links and thencbi_*TSV columns were empty for it. The new flag, for-mbuilds and--update, downloads NCBI'snew_taxdump.tar.gzon every run (extractingrankedlineage.dmp,nodes.dmpandmerged.dmp, then deleting everything, so nothing NCBI stays in--cache-dir) and streams the one assembly summary a key needs (RefSeq forGCF_, GenBank forGCA_; filtered, never stored), maps each such key's exact assembly accession (version included) to its taxid (merged taxids are followed) and the taxid to its lineage, withnodes.dmpfilling the node's own rank — no name matching — and storesncbi_taxid,ncbi_organism_nameandncbi_taxonomyas ordinary metadata rows with the GTDB columnsNULL, so no reader changed and GTDB rows keep their own NCBI data. The lineage keeps GTDB's seven ranks with the superkingdom asd__; NCBI's kingdom is not one of them and is omitted.setupandsylphd info/GET /inforeport the per-source counts (mapped, no assembly accession, not in the summaries, no lineage). GTDB rows are never replaced, and every run rebuilds the enrichment rows, so reruns are idempotent;--updatewithout the flag deletes the ones no source key refers to any more and drops the counts of replaced sources. The metadata format version is unchanged (3): the enrichment adds rows, not tables or columns. Downloads happen only atsetuptime.
Changed¶
- Web: a source without a lineage in the chosen taxonomy is labelled
<source> (no <Taxonomy> lineage)instead of(not in <Taxonomy>), e.g.GTDB_r232 (no NCBI lineage).
0.4.0 - 2026-11-09¶
Added¶
- Web: sunburst and treemap charts of every taxonomy source at once. A Chart switch next to
the abundance controls offers Bars (the default, unchanged), Sunburst and Treemap. The new
two show one bin per taxonomy source (GTDB, UHGV, fungi, ...), each subdivided by its own ranks,
from the server's All sources (sylph-tax) profile, plus the reads in no database in the
sequence view. Click to zoom in; hover for the lineage; the treemap also pans by dragging and
zooms with the mouse wheel. An Unknown reads: Show / Hide switch (all three charts) leaves the
unknown share out and rescales the rest to the reads found. Right click (or a long press) opens
a panel with the clade's details and a GTDB or NCBI Taxonomy link; Escape resets the treemap;
Download SVG saves the chart (ECharts' SVG renderer). The reads in no database are plain grey
in all three charts. Drawn with Apache ECharts 6.1.0
(Apache-2.0, vendored unmodified in
web/vendor/, loaded only when one of these charts is chosen). - One taxonomic profile per taxonomy source:
tax:<source>./profiletaxprof(andsylphd profile --taxonomy) accept e.g.tax:UHGV_default, bit-exactsylph-tax taxprof -t UHGV_default: the hits are re-resolved against that source alone, so the other sources' hits areNO_TAXONOMYand a key a later source overrides keeps this source's lineage (new goldens from the real sylph-tax 1.9.2). The payload adds the source'sranks, read from the lineage tokens (s__…,vOTU-…) and merged across lineages that skip ranks, and each clade'srank./infometadata.taxonomieslists every accepted taxonomy. The CLI writes<sample>.tax.<source>.sylphmpa. - Web: a chart per taxonomy source. The taxonomy control lists GTDB, NCBI and every source with
hits (e.g.
UHGV_default, charted vOTU … vFAM), from the server's list, so nothing is hard-coded. All sources (the merged sylph-tax tree, whose levels mean different ranks per source) is no longer charted next to them; its.sylphmpahas its own download button.
Changed¶
- Web: the reads in no database (the "dark matter") are shown by default. Estimate unknown
fraction (sylph
--estimate-unknown) is now on, so sequence abundance is a share of all reads and the bar ends in an "Unknown: in no database (estimated)" segment. Without it sylph shares the sample out over the genomes it found, and a marine metagenome with 80 % unknown reads looked fully identified. The option can still be turned off; the API default is unchanged (as sylph). - Web: the abundance chart opens on sequence abundance. With viral databases profiled
alongside GTDB, taxonomic abundance counts genome copies, so small, abundant phages can take
most of the share and leave the prokaryotes as a sliver beside a large "not classified" block.
Taxonomic abundance stays one click away (and a choice made earlier in the browser is kept); the
.sylphmpadownload is unchanged. - Web: "Other" is shaded with vertical lines instead of a solid gray fill, in the bar, its list rows and swatches, so the aggregate of many small taxa no longer reads as one large taxon. The same applies to the other "Other" groups (contig chart, usage statistics).
- Web: other taxonomy sources get their own segments in every view. Genomes without a lineage
in that taxonomy (a viral or fungal catalog profiled alongside GTDB, or GTDB hits in the UHGV view)
are summed per
tax_sourceand shown as e.g. "UHGV_default (not in GTDB)", with horizontal lines in a muted tone per source, instead of falling into the hatched "not classified" share, which now holds only the true remainder. The sources come from the rows, so nothing is hard-coded.
Fixed¶
estimate_unknownon a sketch made from contigs no longer fails with 500. sylph reportsTrue_covinf and NaN abundances for a sketch without read statistics (assylph profile -udoes); JSON has no such numbers, so the encoding failed and the page said it could not reach the server. They are nownullin JSON and empty cells in TSV, and the page leaves out the unknown share it cannot compute.- Web: the rank control follows the taxonomy. Switching to All sources kept the GTDB rank buttons (Species … Domain) while the chart had moved to the source levels.
0.3.3 - 2026-10-31¶
Changed¶
- Web: a compact server bar. It leads with the server's host, which the server cannot fake, then the version, genome count and usage chip, plus one privacy line. Limits, databases, taxonomy sources, the operator's name and text and the full privacy and terms text move into a Details panel that starts collapsed; Change server and reset are icon buttons.
- Web: the Details panel lists Server, Operator, Sketch, Upload and Rate as one aligned list, then a table of the databases with their genome counts and a list of the metadata file's taxonomy sources, with the overlap warning beneath it.
- Web: usage statistics modal. The
#usageview is replaced with an accessible modal dialog over the current page, keeping the user's input, mode and results intact underneath. The modal opens from the status-line chip and can be dismissed by clicking outside, Escape, or the close button;/#usageopens the modal over the default page and clears the hash on close.
Fixed¶
- The example
deploy/Caddyfilealso drops the query string from Caddy's access log:/assemblycarries the sample name, length and GC in it.
0.3.2 - 2026-10-31¶
Added¶
- Opt-in usage statistics.
sylphd serve --usage-db FILEcounts successful requests to/assembly,/contigs,/profileand/queryper ten-minute window, endpoint and kind of client (web,cliwith its version,other): requests, contigs, samples, bases, sketch bytes, histograms of job time and queue wait, peak queue depth. Counters are kept in memory and written to SQLite about once a minute and on shutdown; windows older than 92 days merge into monthly rows. Never IP addresses, names, results or anything per user. Off by default: then nothing is recorded,/usageis a404and/infohas"usage": {"enabled": false}. On, the aggregated totals are public atGET /usageand/inforeportsusage.policy. - Web: a "usage statistics on" chip, a
#usageview and an agreement. The status line links to a view with totals, a 90-day activity chart, the breakdown by endpoint and client, median and 95th-percentile job time and queue wait. Before the first upload to a server that keeps statistics the page asks the visitor to agree (once per server and policy; Cancel sends nothing; "Reset remembered choices" forgets it);choiceModalis now a shared helper.terms.htmldescribes the statistics. - CLI:
profile,queryandassemblyprint one note to stderr per run when the server keeps usage statistics (assembly --quietand--jsonsuppress it);sylphd infoshows the state. - The web page shows the connected server's sylphd version in its status line.
Changed¶
- No client address in any log. The access log line of
sylphd serveno longer hasclient=..., and the exampledeploy/Caddyfiledeletesremote_ip,remote_port,client_ipand the forwarding headers from Caddy's access log. The address is still used in memory for--rate-limit.GET /usageis covered by the rate limit. deploy/sylphd.servicegetsReadWritePaths=-/srv/sylphd/usageandsetup-server.shcreates that directory, for--usage-db(not enabled by default).
0.3.1 - 2026-10-30¶
Added¶
- Server observability. Every response carries
X-Request-Id, andsylphd servelogs one line per request (method, path, status, elapsed ms, client identity, request id) instead of uvicorn's access log./healthgainsjobs_runningandjobs_queued. - Gzip. JSON responses of 1 KB or more are gzip-compressed when the client sends
Accept-Encoding: gzip. --retries Nfor the commands that talk to a server: 429 and 503 answers are retried afterRetry-After(exponential backoff, capped at 30 s). Default 0, the old behaviour.
Changed¶
- Metadata files older than format 3 are no longer read or updated.
MetadataDBandsetup --updaterefuse them with a message to rebuild withsylphd setup; the format 2 reader fallbacks, the 2 → 3 migration and thetaxonomy_overlapbackfill are gone. - Web: one set of shared helpers for all three modes (sortable table, segmented controls,
bar rows, formatters, lineage/rank tables, file names). The per-contig table gains the mobile
sort control; byte sizes are decimal (kB/MB/GB) everywhere and the in-browser input cap is
2 GB; downloads are named
sylphd_<file>_<assembly|contigs|reads>.<ext>; JSON downloads are pretty-printed; the per-contig scale and the reads taxonomy/rank/abundance choices are remembered; per-contig progress counts a batch once it has been classified. server.pyrefuses requests through oneRequestErrorpath and maps job failures in one place; response bodies and status codes are unchanged. A non-integerContent-Lengthon/assemblyis a 400.- Clients and the web page no longer fall back for servers older than 0.3.0: profiles need the
server's
taxprof, and/contigsis assumed to exist. - Web per-contig results follow the Reads and single-assembly look. A Summary stat grid; a Composition card with one stacked-bar segment per queried contig coloured by consensus taxon (√length "Compressed" or linear scale), striped aggregate segments and a "contigs not shown" pill for skipped contigs, and legend rows that filter the table; a contig table with length and ANI bars, GC difference from the assembly mean, a rank chip, and accession links (GTDB-lineage hits link to GTDB whatever their source is named).
Fixed¶
- Docs and the
--min-contig-lengthhelp: skipped contigs are counted, not listed; stale statements updated.
0.3.0 - 2026-10-30¶
Added¶
- Taxonomic profiles are computed on the server.
POST /profileacceptsparams.taxprof: ["gtdb", "ncbi", "tax"](validated against the metadata file's columns and sylph-tax sources, and advertised in/infounder/profile) and every returned sample then carriestaxprof[taxonomy] = {columns, taxonomies_used, clades, sylphmpa}: the aggregated clade table (clade_name,relative_abundance,sequence_abundance,ani/coverageon strain rows) and the exact.sylphmpatext, so neither the CLI nor the web page formats or aggregates anything. The logic exists once, insylphd/taxprofile.py;sylphd profile --taxprof/--taxmatrixwrites the server's text/clades (the matrix remains a trivial clades-by-sample rendering), and the web Reads tab charts the server's clades, including thetaxprofile of UHGV/fungi hits.web/taxonomy.jsand its JavaScript parity tests are gone. /infosays what each database is and which taxonomy it really uses. Every entry ofdatabasesgainskind(two-stagefor a.syl2db,plainfor a.syldb) andgtdb(truewhen a sample of up to 100 genome names of that database are GTDB accessions of the metadata file), so the web panel showsGTDB r<release>only when a GTDB database is actually served — a fungi-only or UHGV server with GTDB metadata for taxonomy lookups no longer claims to be GTDB r232.metadata.taxonomy_sources[].rowsis renamed tokeys, and overlapping sources are reported once per pair inmetadata.taxonomy_overlaps({"sources": [a, b], "keys": n, "examples": [...]}, in setup order, the later source wins) instead of a both-directionoverlapsdict on every source;sylphd infoand the web panel follow.- A hit's display identifier. Every
/assemblyand/contigshit gainsgenome_id: the accession for a GTDB hit (or any hit that has one), thetax_keyfor a hit a non-GTDB taxonomy source resolved, else the first contig id, else the genome file. The web result card/table and thesylphd assemblytables use it, so a UHGV hit no longer says "Assigned from votus_full.fna.gz" (the file every UHGV genome shares). The species-threshold caveats now name the actual source (UHGV_ictv (viruses): ...,FungiRefSeq-latest (fungi): ...), and the web relation legend lists the ranks of the hit's own lineage instead of GTDB's ranks for a UHGV or fungal lineage. -
/infoadvertises theparamseach POST endpoint accepts:params: {"/profile": [...], "/query": [...], "/contigs": [...], "/assembly": [...]}. The lists come from the validators (ProfileParamsfields plusnames/fields/mode/tax_sources,per_contig.PARAM_KEYS, the/assemblyquery-string keys), not a second hand-maintained copy, so a client can hide an option an older server does not know instead of probing it with a 400./profileand/queryresponses echo the effective profiling parameters (params, defaults included), as/assemblyalready does. -
Web page: the server panel lists the databases of a multi-database server and the taxonomy sources (with a warning when sources overlap); the Reads tab has an "Estimate read counts" option (reads in the table and the TSV, as
sylphd profile --estimate-read-counts); non-GTDB hits show their generic taxon under a "Taxon" column, and non-GTDB assignments show the server's species-threshold note. The option is hidden when/infosays the server does not acceptestimate_read_counts(an older server's 400 still explains itself). -
Taxonomy sources in the metadata file (format version 3).
sylphd setup --taxonomy SPECimports sylph-tax files (key<TAB>lineage[<TAB>host], gzip or plain, header rows allowed) next to the GTDB metadata, so a server can later give a lineage to hits from UHGV, fungal RefSeq, MAG and GlobDB databases.SPECis a sylph-tax name (UHGV_default,UHGV_ictv,FungiRefSeq-latest,GTDB_r232,GlobDB_r232, ...),NAME=PATHorPATH; a bare name is downloaded into--cache-dir(default<output dir>/taxonomy) with the existing resume/verify engine.setup -mis now optional, so a file can hold taxonomy sources alone. Version 3 is purely additive: newtaxonomy_source,taxonomy_entry,dict_tax_lineageanddict_tax_hosttables; themetadataview and its columns are untouched, version 2 files keep loading and serving exactly as before, and a version 2 reader opens a version 3 file (a test runs a frozen copy of the previous release's reader, taken from commite72b807, against one). The full GTDB metadata is registered as one virtual sourceGTDB_r<release>overmetadata_data, so no lineage is stored twice; the sylph-tax catalogue file of that same release is skipped with a message when-malready imported it (a different release, e.g.GTDB_r214next to r232, and a local file are imported normally). Keys are stored verbatim (case sensitive, as sylph-tax does), lineages and hosts are dictionary-encoded, sources keep thesetuporder (ord), and a key repeated within a source keeps its last lineage while a host is only replaced by a row that has one — as in sylph-tax. sylphd setup --updateadds sources to an existing metadata file and doubles as the version 2 → 3 migration (no GTDB TSV files needed). It copies the file next to the output in a uniquely named temporary file (safe with parallel runs and with a source called*.tmp), adds the tables/sources and replaces the output only on success — an interrupted update leaves the old file untouched, likesetup --force— and keeps the permissions of the file it replaces. Re-importing a source name replaces it and keeps its position.sylphd download --taxonomy NAMEand--list-taxonomiesadd a second catalogue next to the database one: sylph-tax's files with sizes and MD5 sums read from the Zenodo API (GlobDB r232 on the university fileshare has no published MD5, so only its size is checked). Every database in the catalogue now names the taxonomy file it goes with (Database.taxonomy, plus UHGV'sUHGV_ictvalternative), and the taxonomy table lists the paired database. Taxonomy files are small, so their checksum is always verified (no--verifyswitch); if a catalogue entry lacks size/MD5, the Zenodo API is asked at download time, and an entry that still has no MD5 is refused rather than accepted on its size (GlobDB r232, whose publisher publishes no checksum, is the one size-only entry)./infoandsylphd inforeport the taxonomy sources of a format 3 metadata file: name, kind, origin, MD5, key count (keys) and whether hosts are present (metadata.taxonomy_sources), the shared-key pairs (metadata.taxonomy_overlaps), plusmetadata.sylphtax_rules, the sylph-tax version whose file formats and rules the build implements (1.9.2). Both keys are absent for a format 2 file, so existing output is unchanged.- Several databases in one server.
sylphd serve --db [NAME=]PATHis repeatable;NAME(letters, digits,_,.,-) is the name/inforeports and defaults to the file name, and duplicate names are refused. The databases are loaded in parallel threads and profiled as one pool, exactly likesylph profile db1 db2 sample:/profile,/queryand/assemblyrun against all of them, so genomes of all databases compete in the reassignment and abundances add up to 100 %. All databases must sharek(a mismatch is refused at startup, naming the databases and theirk);cmay differ, and samples are then sketched at the smallestc(logged as a warning because sketches get bigger). Any mix of.syl2dband.syldbworks.GET /infokeepsdatabaseas the pooled view (name/pathjoined,size/genomessummed,cthe minimum,screen_c/two_stageonly when all agree) so existing clients and the web app are unchanged, and addsdatabases: one object per database withname,file,path,size,sha256,genomes,c,k,screen_candtwo_stage. Rows and/assemblyhits carry no per-database field: the taxonomy says where a hit came from.sylphd infolists the databases when there is more than one. A sketch withkother than the commonk, or acabove the pool's minimum, is a400that names the offending database. - A plain
.syldbreports the smallestcof its genomes (they may differ inc), and a plain database whose genomes were sketched with differentkis refused at startup with the database named, instead of advertising the first genome's values and failing on the first request with a genome-named error. The scan reads onlyc/k(measured: +44 ms for 168,536 genomes, 0 ms for 661);.syl2dbfiles are not scanned. - Cached
Profilerobjects. Onepysylph.Profilerper parameter set is kept (an LRU of 8) and shared by all worker threads, instead of building one per request. With two or more databases the constructor scans every genome for duplicates (measured: 93 ms for the target trio's 369 k genomes), so without the cache every request would pay that; the default profiler is built at startup.pysylph.Profileris read-only and safe to share (itsquery/profiletake&selfand release the GIL), so the lock only guards the cache dictionary. pysylph's duplicate-genomeUserWarning(raised by the constructor) is captured and logged once as a bounded summary (count and the first names) instead of vanishing with the first construction. sylphd profile --estimate-read-counts(sylph's experimental--estimate-read-counts):Sequence_abundancethen holds the estimated number of reads per genome instead of a relative abundance. It implies--estimate-unknown, so the coverage column is labelledTrue_covas with-u. Theestimate_read_countskey is also accepted in the/profileparams(and, likeestimate_unknown, forwarded unchanged by/query). Needs pysylphf8f45a1(theuv.lockpin moved fromf32d840).sylphd profile --taxmatrix-value ani|coveragewrites the strain-levelANI (if strain-level)andCoverage (if strain-level)columns of the.sylphmpaas a matrix, likesylph-tax merge --column ANI|Coverage: only clades with a value in at least one sample appear (dropna(how="all")) and a clade missing from a sample gets0.sylphd assembly --per-contigsketches every FASTA/FASTQ record as its own sample and reports the closest genomes per contig, for MAG contamination checks. Each contig gets a contig-relative ANI,100 * (shared / contig_kmers) ** (1/k)(sharedfrom the server'sContainment_ind,contig_kmersfrom a genome-style sketch of the contig), so an exact 20 kb fragment of a 5 Mb genome reports 100 % instead of ~85 %. The 95 % species assignment and GTDB relations use that value, and--min-anifilters on it client-side. The table addscontig,contig_length,gc,status,shared_kmers,contig_kmers,explained_fraction(the fraction of the contig the hit explains),reference_ani(sylph's genome-denominator ANI, kept for continuity) andgtdb_species.--top(default1) and-owork in this mode;--fieldsselects the metadata columns added per hit and is accepted only with--per-contig(the single-assembly table has fixed columns);--jsonemits a per-contig document. A summary on stderr gives the bases per consensus taxon.- Taxonomic consensus per contig. Like CAT/BAT, the command reduces the hits to the best one per
GTDB species and takes the lowest common rank of the species whose divergence
d = 100 - ANIsatisfiesd <= R * d_best + Z * sqrt(sd_best^2 + sd_i^2), with the binomial ANI noisesd = (100/k) * sqrt((1-p) / (n*p)),p = shared/contig_kmers,n = contig_kmers. This keeps a near-exact, well-covered contig at species while a short or noisy one widens to genus or family instead of picking one of several indistinguishable species. A species consensus also requires the best hit to reach the 95 % species threshold; below it the answer is truncated to genus, so a distant contig is not labelled with the species that merely happens to be the closest one. The table addsn_close(number of close species),consensus_rankandconsensus_taxonaftergtdb_species; the JSON adds aconsensusobject (rank,taxon,n_close,species). DefaultsR = 1.5,Z = 2, settable with--consensus-ratio Rand--consensus-z Z(per-contig only, rejected elsewhere). --min-contig-length BP(default20000) skips short contigs; they are not sketched or sent, produce no row, and are counted insummary.skipped_short. A contig with fewer k-mers than sylph'smin_number_kmers(or with no genome-style k-mer) is counted insummary.skipped_few_kmersinstead of producing a spurious match; the server reports such a sketch astoo_few_kmers. Duplicate record ids get a deterministic_2,_3suffix.-
--quietsuppresses the (new or existing) stderr summary ofsylphd assembly. -
Hit → lineage resolution and the merged
taxprofile. Every row of/query,/profileand/assemblynow carriestax_source,tax_key,tax_lineageandtax_hostwhen the server's metadata file has sylph-tax taxonomy sources (format 3); the columns are listed inmetadata.columnsand can be selected with--fields.MetadataDB.resolvemaps a hit'sGenome_file/Contig_nameto a key exactly assylph-to-taxprofv1.9.2 does: two passes of the probesgf,gf + ".gz",glob,contigand the.fa/.fasta/.fnasplits, pass 1 overriding pass 0, keys compared verbatim (UHGV's contig ids and GlobDB's version-stripped keys need exactly that). For a key in several sources the source imported later wins (the largerord, exactly like passing the files later tosylph-tax -t): the lineage comes from the largestord, and the host from the largestordthat has one for that key — so the lineage and the host can come from two different files, like sylph-tax's two dictionaries.--tax-sourcepicks the sources per request when that is not what you want. The keys are looked up in batches of 500 unique probe keys (both passes combined) perINquery overtaxonomy_entry, plus the same batched lookups over the virtual GTDB rows when the file has one; for a typical sample that is one query per 500 keys, not per hit. A hit without any taxonomy hasnullin all four columns and never breaks a request. On such a server the default--fields allTSV appends the fourtax_*columns after the existing metadata columns (their order is unchanged; an explicit--fieldslist is unchanged). sylphd profile --taxonomy taxwrites one merged, sylph-tax-exact profile per sample (.tax.sylphmpa) and, with--taxmatrix,tax.tsv: opaque lineages (no rank parsing), an empty token toUNKNOWN,NO_TAXONOMY;t__<file>:<contig>for unresolved hits,t__<key>as the last level, rows ordered by number of levels and then by decreasing abundance, andTaxonomies_used:['GTDB_r232', 'UHGV_default']naming the sources insetuporder.gtdbandncbikeep sylphd's own normalisation.taxjoins the default--taxonomywhen the server has taxonomy sources, so the default--taxprofthen writes three files per sample (.gtdb,.ncbi,.tax) instead of two;--taxonomy gtdb,ncbirestores the old set.--tax-source NAME(repeatable) restricts the profile to some of them — server-side, as a new optionalparams.tax_sourcesrequest field, so a key found only in an excluded source is a miss; it is the way to choose between sources that share keys (e.g.UHGV_defaultversusUHGV_ictv, where the later-imported source otherwise wins). Parity: synthetic goldens covering every probe rule — including an empty key, truly empty lineage tokens, a header row, hosts resolved across sources (checked against a realtaxprof -arun), an equal-abundance tie and repeated strain rows — are committed and always compared byte for byte, for all four--taxmatrix-values and the one-sample path; the same comparisons rerun against the real sylph-tax when it is installed.-
Overlapping taxonomy sources are counted and warned about. Importing one taxonomy per database is the rule, but
setup(build and--update) no longer accepts a silent overlap: when a source is imported it counts in SQL the keys it shares with the sources already in the file — the virtual GTDB source included, compared onmetadata_data.accessionasresolvedoes — and prints one warning per pair, naming both sources, the number of shared keys, the first five keys and what happens ("the source imported later (NAME) wins for these keys; import only one of them, or rebuild without one"). The warning goes to the logger and to stderr, becausesetupconfigures no logging and-qsilences progress only; the import still succeeds. The counts are stored in the new, additivetaxonomy_overlaptable (both directions, format stays 3; a file written before the table existed still reads, and the next--updatefills it) and are shown as onemetadata.taxonomy_overlapsentry per pair bysylphd infoandGET /info(see above). -
sylphd assemblyclassifies hits from any taxonomy source, not only GTDB. Lineages are parsed generically: rank prefixesddomain,rrealm,kkingdom,pphylum,cclass,oorder,ffamily,ggenus,sspecies,tstrain, andlevel 1...level Nfor the prefix-less UHGV and ICTV lineages (root;Monodnaviria;...loses the root). The 95 % species call applies to every source, andassignment.taxonis the last named rank of the hit's lineage (a GTDB species, a vOTU, a fungal species).assignment,closestand every hit gain the additivetaxonomyobject ({rank: taxon}, shallowest first) andtaxonomy_source, absent only when the hit has no lineage, so a metadata-less response keeps its shape and the single-database/assemblygolden is unchanged. Relations are computed within one taxonomy source: a hit of another source isdifferent source(ordifferent source from closest relative) withshared_rank: null, while GTDB hits always compare with each other. The CLI table addstaxonandtaxonomy_sourcecolumns. - The 95 % caveat outside prokaryotes. When the best hit is not from GTDB,
assignment(orclosestwithout an assignment) carries anoteand the CLI prints onesylphd: warning:line on stderr (suppressed by--quiet, never in--json): the vOTU convention for viruses (MIUViG's 95 % ANI over 85 % of the shorter genome, which sylph's ANI does not check), "no established ANI boundary, a heuristic" for fungi, a generic text for other sources.assembly --per-contigandprofile --taxprof/--taxmatrixwith--taxonomy taxprint each caveat once per output. - Per-contig consensus outside GTDB. The consensus parses lineages generically and reports the
rank's display name (
level 4for a UHGV vSUBGEN); the sub-95 % cap moves one rank up from the species-equivalent rank (GTDB species -> genus, a prefix-less vOTU -> its parent level). A close set spanning two taxonomy sources has no consensus (mixed_sources: truein JSON, emptyconsensus_rank/consensus_taxonin the table). The table adds ataxoncolumn. POST /contigs, a server endpoint that classifies every contig of a fragmented assembly in one request. The body is onesketchpart per contig plus aparamsobject with, per contig,name,contig_kmers(the record's genome-style k-mer count),lengthandgc, and the optionstop,min_ani,consensus_ratio,consensus_z,fieldsandtax_sources. It returns one result per contig (statusok/no_hit/too_few_kmers,hits,assignment,closest,consensus) and a per-requestsummary(bases per consensus taxon, not truncated so a client can merge requests), the distinctcaveatsandelapsed_ms. The whole computation (contig-relative ANI, ANI noise, ranking, classification, consensus) now lives on the server insylphd/per_contig.py, and the CLI's half insylphd/per_contig_client.py. Inputs are checked before anything runs — onecontigsentry per sketch part, unique valid names, positivecontig_kmersno larger thanlength - k + 1,length<= 1e13,gc0-100,top1-50,min_ani70-100,consensus_ratio>= 1,consensus_z>= 0 — and bad input is a400. One/contigsrequest is one job (its contigs run one after the other inside that slot), so--max-queueand--rate-limitcount the request, not its contigs./infolists/contigsinendpoints, andlimits.max_params_bytes(1 MiB, the form-part limit) so a client can budget the JSONparams, which repeats every contig name. See the HTTP API.- Parsimony ranking inside the ANI noise band. Among the hits that are statistically
indistinguishable on the contig side — the same close band the consensus uses,
d <= R * d_best + Z * sqrt(sd_best^2 + sd^2)— and that explain at least 95 % of the contig (explained_fraction >= 0.95,PARSIMONY_MIN_EXPLAINED), the reference with the fewest k-mers is listed first (the highestreference_ani). The saturation condition keeps the rule to containment: at k=31explained_fraction = 0.95is already ~99.83 % ANI, so a >= 95 % assignment can never be moved below the species threshold, and a 97 % hit is not displaced by a smaller reference at 95 %. Everything else keeps the evidence order.sharedsaturates atcontig_kmerswhen a reference contains the contig, so a bacterial assembly that carries a lambda contaminant contig used to outrank the true (far smaller) phage genome with every k-mer of the contig accounted for. On the real lambda contig of the phase-4a mock against GTDB r232 + UHGV,Lambdavirusnow comes first (82/210k-mers,reference_ani97.0) instead of the six lambda-carrying GTDB genomes at83/10 271. The consensus does not drop those containing genomes: a close set that spans UHGV and GTDB staysmixed_sources.
Security¶
POST /contigsis work-bounded.serve --max-contigs N(default 4096) caps the contigs of one request with a400that names the limit;/infoadvertises it aslimits.max_contigs, which the CLI and the web page already use as their batch size. The multipart parser itself is configured withmax_files=N, so the(N+1)thsketchpart is refused before it is spooled to a temporary file (Starlette's "too many files" error becomes the same friendly400); the rest of the body is not read. A whole request is one job and a contig costs ~0.6 s on a server with plain databases, so a public instance should run--max-contigs 100(now the example policy indeploy/): ~40 minutes of a job slot from one ~5 MB upload becomes about a minute. A sketch below the sample k-mer floor (10) is answered astoo_few_kmersbefore the query runs, so a fragmented assembly full of such records costs no profiling work./contigsqueries and scoring no longer run on the event loop. The per-contig query and the scoring/classification/consensus ofsylphd.per_contigrun in the same worker thread while the job slot is held, so a slow or long request cannot delay/healthor/info.- Repeated
params.fieldsare normalised. Every endpoint that takesfieldsremoves duplicates (tuple(dict.fromkeys(...)), liketax_sources) and cannot return more columns than the metadata file has, so a request cannot make a hit repeat a key or the metadata join do duplicate work. /infono longer exposes absolute paths.database/databases[]report the database name and file name only,metadatareportsfile(base name), and a taxonomy source'soriginis its catalogue URL or the base name of a local file. Full paths stay in the server log (sylphd infofollows the new keys).- The browser per-contig path is bounded. Record names are made unique only for the contigs
actually sent (the
counts/usedbookkeeping no longer grows with every record), the wasm sketcher refuses more than 1,000,000 records or a single record longer than 50 Mbp with a message pointing tosylphd assembly --per-contig(checked while parsing, before buffers grow; a line split across chunks is measured joined before its carry buffer is extended, so it cannot briefly outgrow the limit either). deploy/setup-server.shvalidates and escapes what it writes. Database file names (andSYLPH_META) are restricted to[A-Za-z0-9._+-]+, not starting with.or-; empty aliases and multi-line lists are refused;SYLPH_HTTP_MAXmust be a size. Every value in a systemd drop-in goes through one routine that escapes quotes and backslashes, doubles%, and rejects newlines.
Changed¶
- Metadata files older than format 3 are no longer read or updated.
MetadataDBandsetup --updaterefuse them with a message to rebuild withsylphd setup; the format 2 reader fallbacks, the 2 → 3 migration and thetaxonomy_overlapbackfill are gone. - A
/contigsrequest is one job. Previously every contig counted as one server job, so clients had to chunk tomax_jobs + max_queue(18 contigs on the public instance) and a second run of 100 contigs within a minute hit the rate limit. Now the whole request occupies one job slot and runs its contigs sequentially inside it;--max-jobs/--max-queuebound concurrent requests and--rate-limitcounts one POST. The per-request bound is--max-contigs(4096 by default), advertised by/infoaslimits.max_contigs;per_contig_client.chunk_size_forand the web page use it instead ofmax_jobs + max_queue(older servers fall back tomax_sketches). Queue-full behaviour is unchanged: a second request while every job and queue slot is taken is a503withRetry-After: 1. deploy/accepts several databases.SYLPH_DBinsite.envmay be a space-separated list ofFILEorNAME=FILEentries, one--db /srv/sylphd/db/...argument per database; single-database files are unchanged.setup-server.shvalidates every listed file exists, renders the arguments intoSYLPH_DB_ARGSin the service drop-in (systemd expands$SYLPH_DB_ARGSunquoted into separate arguments, which${SYLPH_DB}cannot do), and gainsSYLPHD_DRY_RUN=1to print the fragment without touching the host. No SELinux change is needed: the databases stay plain data in/srv/sylphd/db.--per-contigcounts skipped records instead of listing them. Records below--min-contig-length(summary.skipped_short: {contigs, bp}) and records not sent for too few sketched k-mers or zero genome-style k-mers (summary.skipped_few_kmers) are no longer kept as per-record objects and no longer produce TSV rows or JSONcontigsentries; the stderr summary saysN contigs (X kb) below 20000 bp not classified. This keeps memory and output flat for FASTQ input with millions of short reads. Name-uniqueness bookkeeping insketch_contigsnow covers only sent records (skipped records consume no name and do not grow thecounts/usedsets). Record indexes keep the input order, so skipped records leave gaps.sylphd assembly --per-contignow needs a server withPOST /contigs(this version or newer; an older server answers404). The command still reads the file, sketches every record and measures its genome-style k-mer count locally, but the contig-relative ANI, the ranking, the classification and the consensus are computed on the server, and the per-request summaries are added up instead of re-sending every hit to the client. The table, the JSON document and the stderr summary are unchanged except for the parsimony tie-break above and the skipped-record counting below, and a contig whose genome sketch is empty (a tandem repeat, the ANI denominator would be zero) is counted insummary.skipped_few_kmers(the server answerstoo_few_kmersfor such a sketch) and is not sent, because the endpoint requires a positivecontig_kmers.sylphd servelogs each database it loads (name, kind, genomes,c,k, load time) and the total load time, plus theProfilerconstruction time, on thesylphdlogger at the--log-level; a differingcbetween databases is a warning.ServerConfiggains a keyword-onlydb_paths(the positionalServerConfig(db_path, meta_path, ...)still works for one database; giving both is an error), andcreate_apptakes aDatabaseSet.sylphd profile --taxmatrixnow followssylph-tax mergerow for row: with two or more samples the clade names are sorted lexicographically (one sample keeps the.sylphmpaorder, which is rank by rank, then by abundance), and a missing value is0. Before, rows were in first-seen order, whichdocs/guides/taxonomic-profiles.mdwrongly described as sylph-tax's order; the guide anddocs/commands/profile.mdare corrected. Verified byte for byte againstsylph-tax mergefor all four--columnvalues; a golden and a parity test now guard it.- Per-contig mode batches contig sketches into
POST /contigsrequests withno_adjust,minimum_ani=0,screen_ani=0andmin_contain=3, chunked by the server's advertisedmax_contigs(falling back tomax_sketches; one request is one job) and by the measured request size and JSONparamssize, so a highly fragmented assembly (or one with very long record ids) works against a server with default limits. sylphd assembly --jsonhonours-o/--output(it always wrote to stdout before) and still writes nothing to stderr, in per-contig mode too; the stderr summary exists only in table mode and is now aggregated by consensus taxon and rank instead of by top-hit species.
Documented¶
- Multi-database serving:
docs/commands/serve.md(repeatable--db,NAME=PATHaliases, thek/crules, parallel loading, lower--max-jobsbecause each sample scans the plain databases),docs/commands/info.md(pooled values and the per-database list),docs/reference/http-api.md(databases, the pooleddatabaseobject, the 400 that names the limiting database), anddocs/project/design-notes.md(the cachedProfilerreplaced "a newProfilerper request"). The design note now carries the measured load times, memory, profiler construction and per-sample plain-scan cost of the target GTDB + UHGV + fungi trio. - Per-contig docs state that
no_hitcan be a two-stage-screen miss rather than proof of absence (measured on a real Leptospira assembly: 30 of 236 contigs with a genuine 98-100 % match were dropped, including one at 22.9 kb), how to readscreen_cfromsylphd info/GET /info, that reported species are GTDB names and may be placeholders (K-12 MG1655 isG047199095 sp047199095in r232;--fields ncbi_organism_namegives the NCBI name), and how the consensus resolves 99.9 vs 99.1 % to species and 89.9 vs 89.1 % to genus, with a resolution limit below ~90-92 % ANI. Chimeric contigs are not detected.
Fixed¶
- A
ValueErrorfrom pysylph while profiling (a badk/c, for example a database genome denser than the sample sketch, which sylph treats as fatal) now becomes an HTTP 400 with pysylph's message instead of a 500. Only theProfilerconstructor and theprofile/querycall are translated, so unrelated internal errors still surface as a 500. - The
downloadcatalogue gaveuhgv_c200_dbv1.syldb171,338 genomes; the published file holds 168,536 (checked withlen(pysylph.Database); its MD5 matches the catalogue entry). The c100 entry was left unchanged because there is no local copy to check it against.
0.2.0 - 2026-10-29¶
Changed¶
- Metadata files older than format 3 are no longer read or updated.
MetadataDBandsetup --updaterefuse them with a message to rebuild withsylphd setup; the format 2 reader fallbacks, the 2 → 3 migration and thetaxonomy_overlapbackfill are gone. - Removed
--terms-urland theterms_urlfield ofGET /info. Put terms of use into the--abouttext instead (plain text is fine). sylphd serve:--nameand--aboutare checked once, before the database is loaded. The deployment scripts take the display name fromSYLPH_NAMEinsite.env, so it can contain spaces.- Sample names (explicit or derived from a file name) must not contain tabs, newlines or other
control characters and are limited to 1024 characters; the server answers
400, the client stops with an error. sylphd taxprof/--taxmatrix: an existing directory works as an output prefix without a trailing/; strain rows (t__) are always listed after the species rows (also in the web app).- Job admission.
--max-queuenow limits jobs (samples), not requests: a request is admitted as a whole or refused with503before anything runs, the check happens before the upload body is read, and concurrent requests can no longer slip past a zero-length queue. A batch larger than--max-jobs+--max-queueis always refused. - Unexpected profiling failures are logged on the server (without uploaded data); clients get a generic message. The multipart form is closed deterministically.
- The profiling jobs and
LoadedDatabasemoved fromserver.pytoprofiling.py; the argument parser moved fromcli.pytocli_parser.py. query,profileandassemblycheck their output paths before sketching or contacting the server.sketch-wasm/demo/was removed: the web page inweb/is the one copy of the sketching workers.sketch-wasm/build.shbuilds intoweb/wasmby default.- Deployment:
/srv/sylphdandreleases/are owned by root; the updater builds a release as the service user inside a directory it hands over and makes the finished release root-owned. - Terms of the public service: regular, light academic use of the API from your own scripts is
free too; heavy and commercial use need an agreement. The public instance accepts raw FASTA/FASTQ
on
POST /assembly(--allow-sequences), so the terms no longer say it is sketch-only; raw sequences sent through the API reach the server, are processed in memory and are not stored or logged. The shipped example unit shows--allow-sequencesagain; for other operators it stays optional. New curl example in the HTTP API reference. - The metadata file has one format (the reader for the plain-table "format 1" was removed).
- The server counts a sketch's k-mers with pysylph's new
n_kmersinstead of building a Python dict; the pysylph pin moves to the fork commit that adds it. - The package version lives only in
src/sylphd/__init__.py. - The browser tests (XSS check of the operator text,
.sylspheader parser, taxonomy parity) run in GitHub Actions (web-tests.yml) and fail there instead of being skipped.
Fixed¶
- uvicorn no longer rewrites the client address from
X-Forwarded-For, so--trusted-proxydecides whom to believe. Before, a local client could pick its own rate-limit identity. - Species assignment uses the unrounded ANI: 94.996 is no longer called a species-level hit.
/queryand/profile: more than 4096 sketches is answered400(as documented now), not413.- Downloads: a failed or interrupted
aria2ctransfer keeps its control file and is never resumed by length; an HTTP resume needs a206with a matchingContent-Range; the MD5 is checked per mirror and a corrupt copy falls back to the next mirror; two downloads that would write the same file are rejected. sylphd setup --forcebuilds the new database next to the old one and replaces it only on success; metadata paths containing#or?work; malformed TSV rows report their line number.- Taxonomic profiles: sample names that sanitise to the same file name are rejected before
anything is written.
sylphd downloadreportshttpxerrors as ordinary errors. - Web page: pasting text after choosing a file keeps the text; the file name is no longer sent to
the server (it is only a label in the results); the Reads tab warns when the first read names of
R1 and R2 differ; "no size limit" now says 2 GiB; the new logo is used and the stale
apple-touch-iconlink is gone. - Gzip. The server and the client read concatenated gzip members (
cat a.gz b.gz) as the browser does, and reject truncated streams with a clear error. The browser sketcher rejects gzip headers over 64 KiB and an out-of-rangechunk_size. - Browser, paired reads: memory stays bounded when R1 and R2 have different read lengths (the
sketcher is fed the mate that is behind in records). GC of an assembly is counted by the sketcher,
so FASTA comments and blank lines no longer distort it. Read names with
_R1_001are recognised bysylphdas well, as in the web page. - Docs:
--max-queue, the memory use of an upload and the sketch-size numbers were corrected. - Docs:
--allow-sequencesis optional (the web page and the shipped unit do not need it), the containment denominator is the reference genome's k-mer count, and several other statements that no longer matched the code were corrected.
0.1.3 - 2026-10-29¶
Added¶
- Server description.
sylphd serve --about FILE(UTF-8 Markdown, at most 16 KiB, re-read when the file changes) and--name TEXT(at most 80 characters) are reported byGET /infoasnameandabout({"format": "markdown", "text": ...}), absent when not set. The web page replaces the lone status pill with a server panel: status, name, address, Change server, the fact chips and the operator's text under From the server operator, rendered with the vendored marked and DOMPurify (an allowlist: raw HTML, images and tables are not rendered, only http, https and mailto links) and marked as unverified when you are connected to a server other than the default. - Web page: upload a ready-made sketch. The Reads tab accepts one
.sylspinstead of reads (no sketching: the step is shown as skipped), and the Assembly tab sends a dropped.sylsptoPOST /assemblyas it is, marked uploaded sketch. The page reads the sketch header and refuses acorkthat does not fit the server before uploading anything. - Header chip Upload with the server's
max_upload_mb, the largest sketch it accepts, visible on every view; the other chips explain themselves in their tooltips.
0.1.2 - 2026-10-29¶
Added¶
- Web page: Reads mode. The page now has two equal modes, Assembly and Reads (hash routes
#assemblyand#reads, a landing page and a tab bar). In Reads mode FASTQ/FASTA reads (plain or gzip; single-end, paired or interleaved) are sketched in the browser with a WebAssembly build of the sylph sketcher (sketch-wasm/) and only the sketch is uploaded toPOST /profile. The results show an abundance chart per rank (GTDB or NCBI taxonomy), a sortable genome table and downloads (TSV, JSON,.sylphmpa,.sylsp). See Profiling reads in the browser in the docs. - The Pages workflow and
scripts/preview-pages.shbuild the WebAssembly sketcher intoweb/wasm/(not committed). - Assemblies are sketched locally too.
POST /assemblyaccepts a precomputed sketch (Content-Type: application/vnd.sylph.sketch, the bytes of a.sylsp), validated like/profilesketches and bounded by--max-upload-mb, with optional informationalrecords,lengthandgcquery parameters. It always works, so a server started without--allow-sequencescan never receive a sequence (the public instance runs that way). The response gainsquery.input(sketchorsequence). - Web page, Assembly mode: sketches in the browser (any size, no 20 MB limit) and sends only the sketch, with a sketched locally badge on the result. There is no raw-upload path in the page: a browser that cannot run the sketcher gets a notice (the public instance is sketch-only).
sylphd assemblysketches locally by default;--no-local-sketchuploads the raw sequence to servers started with--allow-sequences.
Changed¶
- Metadata files older than format 3 are no longer read or updated.
MetadataDBandsetup --updaterefuse them with a message to rebuild withsylphd setup; the format 2 reader fallbacks, the 2 → 3 migration and thetaxonomy_overlapbackfill are gone. --allow-sequencesnow only gates raw sequence uploads to/assembly; the endpoint itself is always served (/infolists/assemblyinendpoints). Without the flag a raw upload is still a 404, now with an explanatory message.--max-sequence-mbapplies to raw sequences only.- The rate limit covers
/assemblyon every server.
0.1.1 - 2026-10-28¶
Added¶
sylphd download --database NAMEfetches pre-built sylph databases from a built-in catalogue (--list-databases; GTDB r214–r232, GlobDB, UHGG, UHGV, IMG/VR, OceanDNA, SMAG, RefSeq fungi) using all known mirrors. Usesaria2cwhen installed (parallel, multi-mirror, resumable), otherwise a built-in resumable downloader. Checks the file size by default;--verifyalso checks the MD5.--urladds or replaces sources.- Deployment bundle (
deploy/):setup-server.sh(Caddy from the official COPR, dnf-automatic, uv with a self-update timer, SELinux policy for the Caddy → sylphd socket),update.sh(installs a GitHub release with checksum verification, health check and automatic rollback), a hardenedsylphd.serviceand a Caddyfile template. - Docs: "What does same species mean?" background page on the 95 % ANI species call, linked from the web page.
Changed¶
- Metadata files older than format 3 are no longer read or updated.
MetadataDBandsetup --updaterefuse them with a message to rebuild withsylphd setup; the format 2 reader fallbacks, the 2 → 3 migration and thetaxonomy_overlapbackfill are gone. - Web page: the ANI gauge fills up to the value with zone colours (red and striped below 85 %, orange, green from 95 %), uses a stretched scale for the high range, and marks the value with a clearly visible knob. The page now points at the public server.
Fixed¶
deploy/sylphd.service:Environment=values with spaces are quoted, and variables inside paths are braced, so systemd passes all flags and finds the database.
0.1.0 - 2026-10-28¶
The first release. sylphd is a long-running sylph
server with a sketching client: the database is loaded once and shared, clients send sketches.
Added¶
sylphd serve: loads a.syl2db(two-stage) or.syldbdatabase into memory and serves query/profile/assembly requests over a Unix socket ($XDG_RUNTIME_DIR/sylphd.sock, mode0660) or TCP. Optional GTDB metadata SQLite, upload limits, rate limit, request queue, trusted-proxy handling, CORS and an opt-in endpoint for raw sequences (--allow-sequences).- Client commands that sketch locally and send only sketches:
sylphd info,sylphd query(ANI hits) andsylphd profile(taxonomic abundances), for single-end, paired, interleaved and multi-file samples, or ready-made.sylspsketches. - Output formats: sylph's TSV columns plus
accessionand metadata columns, JSON, andsylph-tax-style.sylphmpaprofiles, clade × sample matrices and sequence matrices. sylphd assembly: identifies a FASTA assembly against the database, with a species assignment at 95 % ANI and the lineage relation of every hit.sylphd downloadandsylphd setup: fetch GTDB metadata (checksums verified) and build the SQLite metadata database.- Web app (https://abrinca.github.io/sylphd/): paste an assembly, get its closest GTDB genomes.
- Release wheels (see Install from a release) for Linux x86_64 and aarch64, CPython 3.14, so a production server can install without a Rust toolchain.