Public
Edited
Feb 8, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
phamilies
SELECT size AS phamilysize, COUNT(*) AS phamiliesbysize
FROM phamilies
GROUP BY size
ORDER BY phamilysize ASC;
Insert cell
Insert cell
db
SELECT phageID, COUNT(geneID)
FROM genes
GROUP BY phageID
Insert cell
Insert cell
db
SELECT cluster, COUNT(*) AS numberOfgenes, ANY_VALUE(size) AS numberOfphages, numberOfgenes/numberOfphages AS avgGenesPerPhage
FROM genes
JOIN phages
ON phageID = phagename
JOIN clusters
ON phages.cluster = clusters.name
GROUP BY cluster;
Insert cell
Insert cell
db
SELECT cluster, MIN(genomelength), AVG(genomelength) AS meanGenomeLen, MAX(genomelength)
FROM phages
GROUP BY cluster
ORDER BY meanGenomeLen;
Insert cell
Insert cell
db
SELECT cluster, COUNT(*) as HNHcount
FROM genes
INNER JOIN phages
ON phageID = phagename
WHERE genefunction LIKE 'HNH%'
GROUP BY cluster
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
db = DuckDBClient.of({ clusters, phages, genes, phamilies })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
db
SELECT phageID, AVG(ABS(stop - start) + 1) as AvgGenelength,
FROM genes
GROUP BY phageID;
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more