Skip to content
Edit this page View source of this page

Profiling reads

sylphd query and sylphd profile mirror sylph query and sylph profile. The client reads the database's c and k from the server, sketches your samples locally, sends the sketches, and writes the returned rows as a TSV.

  • query reports every database genome that the sample contains, with ANI and coverage.
  • profile additionally resolves genomes that compete for the same k-mers and reports taxonomic and sequence abundances. It is also the command that builds taxonomic profiles.

Both take the same inputs and options; see the profile and query references for every flag.

Which one to use

sylphd query: ANI hits, one row per genome. Default --minimum-ani 90.

  • Use when:
    • you want the ANI of known genomes in a read set, one row per genome, as a presence or absence measure;
    • you screen many genomes at genome level, for example for strain-level or association studies (the paper queries all 289,232 UHGG genomes this way).

sylphd profile: abundances, with shared k-mers reassigned between competing genomes. Default --minimum-ani 95, the species threshold.

  • Use when:
    • measuring community composition in a read set;
    • using databases with many related genomes (GTDB, GlobDB), where query would list many relatives of each organism;
    • building taxonomic profiles (--taxprof, merged across samples with sylphd taxmatrix); the tax profile is equivalent to sylph-tax v1.9.2 output (check with sylphd diff).

sylphd assembly: the closest genomes of one assembly, with a species call at 95 % ANI. See Identifying an assembly.

  • Use when:
    • identifying what a single assembly or genome is closest to;
    • checking a MAG for contamination: --per-contig classifies each contig and reports a consensus; contigs that disagree are suspect (short contigs carry too few k-mers for a reliable call).

Inputs

Each file or group of files is one sample. A sample is the unit the server profiles and the name that ends up in Sample_file.

Syntax Meaning
sylphd query reads.fq.gz one single-end sample (positional)
sylphd query -r a.fq b.fq two single-end samples
sylphd query -1 a_R1.fq -2 a_R2.fq one paired sample
sylphd query -1 a_R1.fq b_R1.fq -2 a_R2.fq b_R2.fq two paired samples
sylphd query --interleaved a.fq one interleaved paired sample
sylphd query --sample "s1:a.fq,b.fq" one sample from two files
sylphd query --sample "s1:a1.fq+a2.fq,b1.fq+b2.fq" one sample from two pairs
sylphd query sample.sylsp an existing sketch, sent as-is

FASTA and FASTQ are read with dnaio, so gzip, bzip2, xz and zstd files work. -r also takes assemblies and long reads. Options can be combined; samples are processed in the order positional files, -r, -1/-2, --interleaved, --sample.

Sample names

A sample name defaults to the file's base name without compression and read suffixes (.gz, .fastq, .fq, .fasta, .fa, .fna, .sylsp, ...). For paired samples _R1, _R2, .R1, .R2, _1, _2 and Illumina's _R1_001 are removed too, so sample-a_R1.fastq.gz becomes sample-a.

Two samples with the same name are an error. Use --sample-name NAME to rename a single sample, or --sample NAME:SPEC to name a sample explicitly.

--sample NAME:SPEC

SPEC is a comma-separated list of inputs. A pair is written R1+R2:

sylphd profile --sample "gut1:lane1.fq.gz,lane2.fq.gz" \
               --sample "gut2:l1_R1.fq.gz+l1_R2.fq.gz,l2_R1.fq.gz+l2_R2.fq.gz"

All inputs of a sample are combined into one sketch. They must be all single-end or all paired; mixing the two is an error.

Existing sketches (.sylsp)

A file ending in .sylsp is sent without sketching. The server checks that the sketch matches the database: k must be equal, and c must not be sparser than the database (c <= db.c). A sketch made with another k is rejected, and a sketch with a larger c has to be re-sketched from the reads.

Threads

-t/--threads sets how many samples are sketched in parallel on the client (default 4). Profiling on the server is limited separately by --max-jobs.

Thresholds

The defaults are sylph's.

Option Default Meaning
--minimum-ani 90 (query), 95 (profile) minimum adjusted ANI, 0-100. sylph warns that a profile value below 95 gives inaccurate results; use query for relatives at 90–94 % ANI
--seq-id none read sequence identity in percent, only used with --estimate-unknown
--estimate-unknown off estimate true coverage and scale sequence abundance of unknowns
--estimate-read-counts off profile only: put the estimated number of reads per genome in Sequence_abundance instead of a relative abundance (experimental in sylph); implies --estimate-unknown
--min-number-kmers 10 discard genomes with fewer sampled k-mers
--min-contain 7 minimum contained k-mers for a hit
--screen-ani 85 two-stage screen threshold, 0-100
--no-adjust off naive containment ANI instead of the adjusted ANI; for assemblies, see Identifying an assembly

Output

The default output is a TSV on stdout, or -o FILE. --format json prints the server payload (a list with one object per sample, see the HTTP API). The TSV mirrors sylph's columns, followed by accession, genome_id and the metadata columns:

query:    Sample_file Genome_file Adjusted_ANI Eff_cov ANI_5-95_percentile
          Eff_lambda Lambda_5-95_percentile Median_cov Mean_cov_geq1
          Containment_ind Naive_ANI Contig_name  accession genome_id <metadata...>
profile:  Sample_file Genome_file Taxonomic_abundance Sequence_abundance
          Adjusted_ANI Eff_cov ANI_5-95_percentile Eff_lambda
          Lambda_5-95_percentile Median_cov Mean_cov_geq1 Containment_ind
          Naive_ANI kmers_reassigned Contig_name  accession genome_id <metadata...>
Column Meaning
Sample_file sample name
Genome_file database genome file name, as stored in the database
Adjusted_ANI coverage-adjusted ANI in percent, capped at 100 in the TSV, as in sylph (the naive ANI with --no-adjust)
Eff_cov effective coverage; labelled True_cov with --estimate-unknown (or --estimate-read-counts, which implies it), as in sylph
ANI_5-95_percentile confidence interval of the adjusted ANI, low-high; NA-NA when there is none
Eff_lambda, Lambda_5-95_percentile sylph's effective lambda (its coverage model parameter) and its interval (NA-NA when there is none); Eff_lambda is HIGH (median coverage too high) or LOW (not estimable) when lambda cannot be estimated
Median_cov, Mean_cov_geq1 median coverage and mean coverage of k-mers seen at least once
Containment_ind contained k-mers over total genome k-mers, 7096/10826
Naive_ANI containment ANI without the coverage adjustment
Taxonomic_abundance, Sequence_abundance profile only: relative taxonomic and sequence abundance (Sequence_abundance holds estimated read counts with --estimate-read-counts)
kmers_reassigned profile only: number of k-mers reassigned during profiling, as in sylph
Contig_name contig name and description recorded for the genome in the database
accession genome accession (GCA_.../GCF_...) derived from Genome_file; empty when there is none
genome_id stable identifier of the database genome: the accession of a GTDB hit, the taxon key of a hit a non-GTDB taxonomy source resolved (a UHGV contig id, ...), else the first word of Contig_name, else Genome_file; the same rule as /assembly and /contigs

Missing values are written as sylph writes them, so the text of every row is identical to sylph's (the metadata columns and accession use empty cells; genome_id, like accession, is not a sylph column, so sylphd diff ignores it). The TSV is equivalent to sylph 1.0.0's: the same genomes and the same values, but rows with exactly equal abundance (or ANI) can come in a different order, which stock sylph itself varies between runs with several threads. Check with sylphd diff. For a sketch without read statistics (one made from contigs or an assembly) under --estimate-unknown, True_cov is inf and the abundances are NaN.

--fields selects the metadata columns that follow (comma-separated names, all by default, none to omit them); see the metadata database for the names. --fields needs a server started with --meta. Unknown column names are rejected.

With --no-adjust, Adjusted_ANI equals Naive_ANI. ANI_5-95_percentile is printed exactly as stock sylph prints it: it is still the interval of the adjusted estimate, so it need not contain the naive value, and it is NA-NA only when sylph computes none.

Using a remote server

Add --url, --tcp or --socket to any client command, or set $SYLPHD_URL or $SYLPHD_SOCKET; see Server address. Sketching stays local in every case.

sylphd query --url https://api.example.org/sylphd reads.fq.gz

A public instance may rate-limit /query and /profile. The terms of the Abrinca web service allow regular, light academic use of the API, while heavy and commercial use need an agreement; see Terms and Running a public server.