Skip to main content

Publishing Datasets

After completing the curation pipeline, the publish commands help you build metadata, upload datasets to Latch Data, and notify paper authors.

Prerequisites

Before publishing, ensure you have:
  1. Completed the curation pipeline through harmonize-metadata
  2. Configuration files in ~/.latch/latch-curate/:
    • metadata_schema.yaml - Metadata harmonization schema
    • cell_typing_schema.yaml - Cell typing vocabulary
  3. Latch credentials in ~/.latch/:
    • token - Your Latch SDK token
    • workspace - Workspace ID (JSON or plaintext)

Setting Up Credentials

Setting Up Configuration Files

Publish Workflow

Step 1: Build

Generate metadata and validate the curated dataset.
This command:
  • Extracts paper title and abstract via API
  • Retrieves corresponding author contact information
  • Validates harmonized metadata against your schema
  • Validates cell typing against configured vocabulary
  • Extracts ontology tags (disease, tissue, assay, cell types)
  • Generates publish/build.yaml with all metadata
Required files:
  • download/paper_text.txt - Paper text or abstract
  • download/paper_url.txt - URL to the paper
  • download/external_id.txt - GEO accession ID
  • harmonize_metadata/harmonize_metadata.h5ad - Curated AnnData
Outputs:
  • publish/build.yaml - Build metadata file
  • publish/publish.h5ad - Final curated object
Example output:

Step 2: Upload

Upload the dataset to Latch Data and register it in the data portal.
You will be prompted for:
  • Destination path: Where to store the dataset in Latch Data (e.g., latch:///datasets/)
  • Curator organization ID: Your organization’s ID in the system
  • Dataset version: Version string (e.g., v1.0.0)
  • Curator dataset ID: Unique identifier for this dataset (defaults to GEO ID)
Or provide options directly:
What happens:
  1. Uploads publish/ directory to Latch Data
  2. Retrieves the ldata node ID for the uploaded files
  3. Registers the dataset with the data portal API
  4. Returns family ID and dataset ID on success
Example output:

Step 3: Email (Optional)

Send notification emails to paper authors about the curated dataset.
Prerequisites:
  • Email configuration at ~/.latch/latch-curate/email-info.json:

Troubleshooting

Missing configuration files

Ensure configuration files exist at ~/.latch/latch-curate/. See Configuration Reference for schema formats.

Missing pipeline files

Run the full curation pipeline first, or create the required files manually:

Cell typing validation failed

Add the missing cell type to ~/.latch/latch-curate/cell_typing_schema.yaml:

Token not found

Run latch login or manually create the token file:

Workspace not configured

Create the workspace file:

build.yaml Reference

The build file contains all metadata for the dataset: