Profiling reads in the browser¶
The web app has two equal modes, and both sketch in your
browser: Assembly finds the closest genomes of an assembly (see
Identifying an assembly) and Reads gives a taxonomic
profile of sequencing reads. In Reads mode you drop the reads on the page and nothing but a small
sketch leaves your computer. The web app does not offer query; use sylphd query on the command line.
Reads never leave your computer
The reads are read, decompressed and sketched inside your browser (WebAssembly in Web
Workers). Only the sketch, a list of k-mer hashes and counts of a few MB, is uploaded to the
server's POST /profile. It contains no
sequences, read names or qualities. The server does not store or log it.
FASTQ.gz file in the browser against sylphd.abrinca.com (upload/profiling wait sped up 4×).How to use it¶
- Open the Reads tab (or
#readsin the address) and wait for the server status to turn green. The page sketches with the server'scandk, which it reads fromGET /info. - Drop FASTQ or FASTA files (plain or
.gz), or choose them:- one file: single-end reads, or interleaved pairs (
R1, R2, R1, R2, …); - two files: paired-end
R1+R2. Names like_R1/_R2,_R1_001/_R2_001,_1/_2or.R1/.R2are recognised and put in order; Swap R1 / R2 flips them, and Two single-end files combines them into one single-end sample instead. The page compares the name of the first record of each file (ignoring/1,/2and the Illumina comment after the first space) and warns if they differ; only the first pair is checked, not the rest of the files; - three or more files are combined into one single-end sample (for example lanes).
- one file: single-end reads, or interleaved pairs (
- Check the sample name (it defaults to the file name without suffixes) and press Sketch and profile.
The options sit under the file list, all visible. You can change the minimum ANI (default 95 %, as
sylph profile; type any value or use the slider next to the field, which moves in whole numbers
from 90 to 95, and shows the nearest position when you type something else) and the minimum
number of k-mers per genome (10), turn off Estimate unknown fraction (--estimate-unknown, on by
default) or turn on Estimate read counts (--estimate-read-counts, experimental: reads per genome instead of a share
of the sample; it implies Estimate unknown fraction), or choose Only sketch to keep the sketch without uploading it.
While it works the page shows the stages (reading and decompressing, sketching, uploading, profiling), the bytes read, the reads, bases and sketch k-mers counted, the elapsed time and the speed. Cancel stops the workers immediately.
Results¶
- Summary: sample, reads (or read pairs) and bases, sketch size, genomes detected, timings and, the estimated share of the reads that are in no database (the "dark matter"; Estimate unknown fraction, on by default).
- Abundance: three charts, switched with Chart (the choice is kept in this browser).
Bars (the default) is described below. Sunburst and Treemap show every taxonomy source in
one chart: one bin per source (e.g.
GlobDB_r232,UHGV_default), subdivided by that source's own ranks down to species (or vOTU), from the server's All sources profile (sylph-tax's merged tree, the.sylphmpaof the download button); a chain of single children is one node, e.g. GlobDB_r232 › Bacteria. In the sequence view the reads in no database are their own bin (plain grey), so a poorly covered sample shows its dark matter at a glance. Click a sector or box to zoom in; the sunburst zooms out with its centre (its rings widen as you zoom in, labels that do not fit are hidden); the treemap zooms out with the path below it, pans by dragging and zooms with the mouse wheel (Reset view or Escape lays it out again). Right click a sector or box (or press and hold it on a touch screen) for its rank, value, lineage and a link (GTDB's tree browser for GTDB and GlobDB clades, except GlobDB's own species, an NCBI Taxonomy search for other ranked names). Download SVG saves the chart as drawn, zoom included. Unknown reads: Hide (in every chart) leaves the unknown share out and rescales the rest to shares of the reads found in the databases, assylph profilereports them without--estimate-unknown. Hover for the full lineage and value. The chart library (Apache ECharts, 369 kB gzipped, vendored) is loaded the first time one of these charts is chosen. - Bars: a stacked bar and a sorted list per taxon. Choose the taxonomy (GTDB, NCBI,
and one per taxonomy source of the server with hits in the sample, such as
UHGV_defaultorFungiRefSeq-latest), the rank (domain to species, or the source's own ranks, e.g. vOTU to vFAM) and the abundance (sequence, the default, or taxonomic). The clades come from the server's/profiletaxprofresponse (the same aggregation as Taxonomic profiles); the page only groups them by rank. Hits outside the chosen taxonomy are one segment per taxonomy source (horizontal lines), e.g. UHGV_default (no GTDB lineage); the taxa past the top ten are Other (vertical lines); only genomes of the taxonomy without a name at the chosen rank are not classified at that level (diagonal hatch). In the sequence view the reads in no database are the last segment, Unknown: in no database (estimated) (hatched the other way): sylph's--estimate-unknownmakes sequence abundance a share of all reads, so for a poorly covered sample (a marine metagenome, say) most of the bar can be unknown. Taxonomic abundance is a share of the genomes found, so it has no unknown segment. A sketch made from contigs has no read statistics, so sylph cannot estimate the unknown share and the segment is left out. Sequence abundance is the default because taxonomic abundance counts genome copies, which small, abundant phages dominate when viral catalogs are profiled with GTDB. - Detected genomes: a sortable table with both abundances, the adjusted ANI (and its 5–95 %
interval), the effective coverage, the GTDB species and lineage, the NCBI organism and taxid, and
links to NCBI plus, for a GTDB genome, GTDB (otherwise a badge naming the hit's taxonomy source). A GlobDB genome that is not in GTDB (
MOTU…,SPIREOTU_…, …) has no public genome page and is shown by its ID without a link. - Downloads: the table as TSV (the same columns as
sylphd profile), the response as JSON, the taxonomic profile as.sylphmpa(the same file assylphd profile --taxprof, for the selected taxonomy; a source's file issylph-tax taxprof -t <source>), the merged sylph-tax profile of all sources (All sources,sylph-tax taxprofover every source) and the sketch itself as<sample>.sylsp.
The downloaded sketch works with the command line: sylphd profile sample.sylsp uploads it as it
is. The sketches are byte-identical to the ones sylphd makes with pysylph, apart from the order
of the k-mer entries.
Re-uploading a sketch¶
A .sylsp file, whether you downloaded it from this page, or sylph sketch, pysylph or sylphd
wrote it, can be dropped on the Reads tab instead of reads (or on the Assembly tab, below). Nothing
is read or sketched: the page shows the file, reads its small header and checks it against the
server before uploading. The sketch must have the same k as the server and may not be sparser
(c no larger than the server's), otherwise the page says which c and k it was made with and
which the server uses. The sample name comes from the file name, the profile is the same as for the
reads. A result shows one sample, so one .sylsp at a time (the page says so if you drop
several), and a sketch cannot be mixed with reads. The Upload chip in the header is the largest
sketch the server takes; typical sketch sizes are in
Sizing the upload limit.
Access token¶
A server can lift its rate limit for holders of a token, or require one. The key button in the server bar at the top of the page opens a form: paste the token and Save. It is remembered in this browser for that server only and sent only to it; the page says token accepted or token not accepted, and a server that requires a token opens the form by itself. Forget removes it. See Privileged access for what to keep in mind on a shared computer.
Incompatible server¶
The page checks the server's api_version before it sketches anything. A server that speaks
another version gets an Incompatible server banner that says whether the server is newer or older than the page, and nothing is uploaded.
Limits and what to expect¶
- Speed: a 1.55 GB gzipped ONT file (254k reads, 2.1 Gbp) is sketched in about 10 s in
Chromium (pysylph: 6–7 s), then the server takes a few seconds. Firefox needs about 14 s.
Decompression is the bottleneck for gzip input; plain FASTQ skips it and is limited by the
sketching itself (about 5.5 s of the 10 s here, estimated, not measured end to end), so it is
faster than the same reads as
.gz. - Memory: WebAssembly in a browser tab is limited to 4 GB. Bacterial isolates and long-read samples need tens of MB; deep short-read metagenomes with hundreds of millions of distinct k-mers can reach the limit. The page warns when the sketcher uses more than 1.5 GB and stops with a clear message before the limit. Use the command line for such samples.
- Sketch size: about 12 bytes per k-mer. The server (and its proxy) limit the upload; a
413keeps the sketch on the page so that you can download it. - Errors: rate limits (
429) and a full queue (503) keep the sketch and offer Upload again after theRetry-Aftertime, so nothing is sketched twice. Corrupt or truncated gzip files are reported with a message. - Browsers: tested in Chromium and Firefox. WebAssembly SIMD and module workers are required (Chrome/Edge 91, Firefox 114, Safari 16.4 or newer; Safari is untested). The page needs no special HTTP headers.
- The sketcher uses sylph's seeding as it behaves on x86-64 with AVX2, like the pysylph the server runs; sketches from other CPUs can differ by up to three k-mers per read.
The Assembly mode sketches the same way¶
The Assembly tab uses the same WebAssembly sketcher: a pasted FASTA goes straight to it, a file
(plain or .gz, up to 2 GB) through the same decompress and sketch workers.
The page counts the records, length and GC content while sketching, sends only the sketch to
POST /assembly (Content-Type:
application/vnd.sylph.sketch) and marks the result sketched locally. A 2.8 Mb assembly takes
about half a second, a 120 Mb pool of corrected reads about 2.5 s including the search. The hits are
identical to those of a server-side sketch of the same assembly.
A ready-made .sylsp sketch of an assembly can be dropped on the Assembly tab too. It is sent to
the same endpoint as it is, with the checks described under re-uploading a sketch. The
page cannot know the number of records, the length or the GC content of an assembly it did not
see, so the summary shows "–" for them, and the result is marked uploaded sketch.
Building the sketcher¶
The sketcher is built from the Rust workspace in rust/ (sylphd-core + sylphd-wasm),
which runs sylph's own library core (the kernels behind pysylph's Sketcher) on WebAssembly. The binaries are not committed: the Pages
workflow and scripts/preview-pages.sh build them into web/wasm/ (needs cargo, the
wasm32-unknown-unknown target and wasm-bindgen-cli 0.2.129). Serving web/ without that
directory still works; the Reads mode then says that the sketcher is missing.