Skip to content
jgi-lakehouse logo

JGI Lakehouse Skill

jgi-lakehouse

Queries JGI Lakehouse (Dremio) for genomics metadata from GOLD, IMG, Mycocosm, Phytozome. Downloads genome files from JGI filesystem using IMG taxon OIDs. Use when working with JGI data, GOLD projects, IMG annotations, or downloading microbial genomes.

SKILL.md

Full skill instructions

JGI Lakehouse Skill

Quick Start

What is it? JGI's unified data warehouse (651 tables) + filesystem access to genome files.

Two data access methods:

  1. Lakehouse (Dremio) → Metadata, annotations, taxonomy (no sequences)
  2. JGI Filesystem → Actual genome files (FNA, FAA, GFF) via taxon OID

SQL Dialect: ANSI SQL (not PostgreSQL)

  • Use CAST(x AS type) not ::
  • Use REGEXP_LIKE() not ~
  • Identifiers with dashes need double quotes: "gold-db-2 postgresql"
-- Quick test
SELECT gold_id, project_name FROM "gold-db-2 postgresql".gold.project
WHERE is_public = 'Yes' LIMIT 5;

When to Use

  • Query JGI genomics metadata (GOLD, IMG, Mycocosm, Phytozome)
  • Find genomes by taxonomy, ecosystem, or phenotype
  • Download microbial genomes with IMG taxon OIDs
  • Cross-reference GOLD projects with IMG annotations

Data Access: Lakehouse vs Filesystem

NeedSourceAccess Method
Metadata (taxonomy, projects)LakehouseSQL via REST API
Gene annotations (COG, Pfam, KO)LakehouseSQL via REST API
Genome sequences (FNA)JGI FilesystemCopy from /​clusterfs/​jgi/​img_merfs-ro/
Protein sequences (FAA)JGI FilesystemCopy from /​clusterfs/​jgi/​img_merfs-ro/
Metagenome proteins onlyLakehousenumg-iceberg.faa table

Critical insight: The Lakehouse is a METADATA warehouse. Genome sequences must be accessed from the JGI filesystem or downloaded from NCBI.


Key Data Sources

SourcePathContents
GOLD"gold-db-2 postgresql".gold.*Projects, studies, samples, taxonomy
IMG"img-db-2 postgresql".img_core_v400.*Taxons, genes, annotations (244 tables)
Portal"portal-db-1".portal.*Download tracking, file paths
Mycocosm"myco-db-1 mysql".<organism>.*Fungal genomes (2,711 schemas)
Phytozome"plant-db-7 postgresql".*Plant genomics
NUMG"numg-iceberg"."numg-iceberg".*Metagenome proteins, Pfam hits

Full table catalog: See docs/​data-catalog.md


Downloading Genomes with IMG Taxon OIDs

Option 1: JGI Filesystem (Fastest)

# Genome packages are at:
/​clusterfs/​jgi/​img_merfs-ro/​img_web/​img_web_data/​download/​{taxon_oid}.tar.gz

# Example: Copy and extract
cp /​clusterfs/​jgi/​img_merfs-ro/​img_web/​img_web_data/​download/​8136918376.tar.gz .
tar -xzf 8136918376.tar.gz

Package contents:

  • {taxon_oid}.fna - Genome assembly
  • {taxon_oid}.genes.faa - Protein sequences
  • {taxon_oid}.genes.fna - Gene nucleotide sequences
  • {taxon_oid}.gff - GFF annotations
  • {taxon_oid}.cog.tab.txt - COG annotations
  • {taxon_oid}.pfam.tab.txt - Pfam annotations
  • {taxon_oid}.ko.tab.txt - KEGG KO annotations

Option 2: Query Lakehouse + Download from NCBI

-- Get NCBI accessions for download
SELECT assembly_accession, organism_name, assembly_level, genome_size
FROM "gold-db-2 postgresql".gold.ncbi_assembly
WHERE assembly_level = 'Complete Genome' AND group_ = 'bacteria'
LIMIT 10;
# Download via NCBI datasets CLI
datasets download genome accession GCA_000219355.1 \
    --include genome,gff3,protein --filename genome.zip

Detailed workflow: See examples/​04-download-img-genomes.md


Common Queries

Find Bacterial Isolate Genomes

SELECT taxon_oid, taxon_display_name, phylum, genus, species
FROM "img-db-2 postgresql".img_core_v400.taxon
WHERE domain = 'Bacteria'
  AND genome_type = 'isolate'
  AND is_public = 'Yes'
  AND seq_status = 'Finished'
LIMIT 100;

Link GOLD Project to IMG Taxon

SELECT t.taxon_oid, t.taxon_display_name, t.sequencing_gold_id
FROM "img-db-2 postgresql".img_core_v400.taxon t
WHERE t.sequencing_gold_id IS NOT NULL
LIMIT 50;

Find Genomes with File Paths (Portal)

SELECT taxonOid, filePath
FROM "portal-db-1".portal.downloadRequestFiles
WHERE taxonOid IS NOT NULL
  AND filePath LIKE '%.tar.gz'
LIMIT 20;

Critical Pitfalls

WrongCorrect
Join ncbi_assembly on project_idncbi_assembly has no project_id; use bioproject or biosample
project.ecosystemJoin study via master_study_id
SHOW SCHEMAS IN "source"Works, but some syntax errors in older Dremio
Get sequences from LakehouseDownload from filesystem or NCBI
sra_experiment_v2.platformUse library_instrument

Authentication

export DREMIO_PAT=$(cat ~/​.secrets/​dremio_pat)

Token setup: See docs/​authentication.md


API Access

REST API Base: http://lakehouse-1.jgi.lbl.gov:9047/​api/​v3

# Use scripts/​rest_client.py
from rest_client import query
results = query("SELECT * FROM ... LIMIT 10")

Documentation

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View