SQL playground

Run SQL against the latest bioc-on-ice release in your browser with DuckDB-Wasm. Nothing to install.

Edit the query and press Run. It runs in your browser with DuckDB-Wasm, against latest/ attached as bioc (and selected with USE bioc, so annotation.gene works as well as bioc.annotation.gene). The first run downloads DuckDB itself, a few MB.

Queries that filter and use LIMIT are fast, because DuckDB fetches only the parts of each Parquet file it needs. Full scans of the big tables (raw.icite__metadata is 12 GB, annotation.icite__citation 8 GB) are slow and can run out of browser memory. For those, use DuckDB on your own machine. To browse tables and column docs, use the Explorer.

Queries to try

Copy one into the box, or open it in the DuckDB Shell.

-- Every table in the release, by schema
SELECT schema_name, view_name
FROM duckdb_views()
WHERE database_name = 'bioc' AND NOT internal
ORDER BY 1, 2;
-- Mouse genes by source
SELECT source, count(*) AS genes
FROM annotation.gene
WHERE taxon_id = 10090 AND valid_to IS NULL
GROUP BY source;
-- The provenance of this release
SELECT release, published_at, git_sha
FROM read_json('https://data.bioconice.cancerdatasci.org/latest/manifest.json');
-- One BugSigDB signature as a list of member names
SELECT bsdb_id, list(taxon_name ORDER BY member_index) AS members
FROM annotation.signature_taxon
WHERE bsdb_id = 'bsdb:83/1/1'
GROUP BY bsdb_id;