Skip to contents

smash2lab 0.2.0

  • Example sourmash signatures of 30 bacterial isolates from BioProject PRJNA1570337 (smash_example("isolates"), smash_example("isolate_runs")), with worked isolate examples in every vignette: genome sizes and sequencing-error filtering, isolate timelines by species, the hashes that tell strains apart, and choosing a strain-level ANI threshold.
  • smash_compare_plot(type = "network", layout = "circle") groups samples around the circle by colour and shape (e.g. subject and species), and places sample_labels outside it.
  • Long colour and shape legends in smash_timeline() and smash_compare_plot() wrap onto several rows; smash_timeline() shows the sample-type legend only when isolates and metagenomes are mixed.

smash2lab 0.1.0

  • First version, following the design of sylph2lab, funprofiler2lab and rgi2lab, for sourmash sketches of cultured isolates and of metagenomes:
    • smash_aggregate() reads sourmash signatures in R (.sig, .sig.gz and .zip), keeping every hash (as exact text) and its abundance, with the sketch parameters (k, scaled, seed, method, molecule). It joins sample metadata and records what was sketched: sample_type ("isolate" or "metagenome", from the BioSample package of an sra2lab run table, or given), species (isolates only) and sample_source. min_abundance drops k-mers from sequencing errors and downsample coarsens sketches, as sourmash sig filter and sourmash sig downsample do.
    • smash_hashes() gives one row per sketch and hash, for assigning hashes to species or strains later.
    • smash_timeline(), the cohort sampling timeline of sylph2lab, with isolates and metagenomes drawn as different shapes, and isolates coloured (color_var = "species") or split into panels (facet_var = "species") by species.
    • smash_heatmap() plots hashes (rows) across subjects, sources and time (columns), choosing shared, prevalent or abundant hashes, the hashes of reference samples, or hashes you give (optionally in groups).
    • smash_compare() computes, in R, the similarities of sourmash compare for every pair of sketches: Jaccard, containment (both directions), maximum and average containment, angular similarity, and their ANI estimates. They match sourmash 4.9 exactly. smash_compare_matrix() arranges one as a matrix, and smash_read_compare() reads sourmash compare --csv output into the same form.
    • smash_compare_plot() plots comparisons as a matrix (in blocks by subject), distributions (same subject versus different subjects, per group), a PCoA ordination, or a network of pairs above a threshold (directed for containment).
  • Example sourmash signatures of 18 runs and the run table from BioProject PRJNA1556220 (smash_example()), the runs of the sylph2lab, funprofiler2lab and rgi2lab examples.
  • A pkgdown website, https://bjklab.github.io/smash2lab/, built and deployed to the gh-pages branch by a GitHub Actions workflow on every push to main.