lamindb
하는 일
LaminDB는 생물학 데이터와 그 분석 과정을 정리하고 추적하도록 돕습니다. 데이터셋을 등록하고, 메타데이터에 주석을 달며, 결과를 재현 가능하게 만들 수 있습니다.
사용하는 경우
- ✓생물학 데이터셋을 등록할 때.
- ✓DataFrame이나 AnnData의 메타데이터에 주석을 달 때.
- ✓과학 스크립트나 워크플로를 추적할 때.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/lamindb/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 유전 실험 데이터를 정리하고 제가 수행한 분석을 추적해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
데이터를 어떻게 구조화할지(스키마)와 어떤 정보가 중요한지(특성)를 정의합니다. 그다음 파일과 스크립트를 등록해, 모든 것을 찾고 재현할 수 있도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
LaminDB
When to use
Use for registering biological datasets, curating DataFrame/AnnData metadata, querying annotated artifacts, and tracking scientific scripts or workflows. LaminDB stores metadata in SQLite/PostgreSQL and files in configured storage; registration alone does not establish scientific validity or FAIR compliance.
This skill targets LaminDB 2.10.0 and Bionty 2.5.0. The local examples were
executed on Python 3.12, pandas 3.0.6, and AnnData 0.13.2. The LaminDB release
caps AnnData at 0.13.2; preserve its dependency constraints. Install IPython for
registry synonym helpers (add_synonym() imports it in this release).
Workflow
- Confirm the intended instance, storage, and write scope with
lamin info. Use a new local development directory for experiments. See setup and deployment. - Define typed
Featurerecords and aSchemafor the biological data. Use registry-backed categorical dtypes for controlled vocabularies;dtype=stronly checks strings. See annotation and validation. - Review the ontology source/version and organism. Standardize only reviewed synonyms and preserve unresolved annotations. See Bionty ontologies.
- In a script or notebook, start
ln.track(), load registered inputs, validate, and save outputs.curator.validate()returnsNoneon success and raisesln.errors.ValidationErroron failure. Repair, then validate again. - Save through the curator or a schema-aware artifact constructor. Check the
stored schema and round-trip content; finish a successful run with
ln.finish(). - Query metadata before loading content. Record artifact UIDs and schema/source provenance for reproducibility; a key can resolve to a newer version later. See queries and streaming.
Local worked example
Run in a dedicated environment and an empty project directory:
uv venv --python 3.12
uv pip install 'lamindb==2.10.0' 'bionty==2.5.0' 'ipython==9.17.1'
source .venv/bin/activate
lamin init --storage ./storage --name biology-demo --modules bionty
Save the following as curate_qc.py, then run python curate_qc.py:
import pandas as pd
import lamindb as ln
ln.track(params={"analysis": "QC metadata curation"})
count = ln.Feature(name="gene_count", dtype=int).save()
condition = ln.Feature(name="condition", dtype=str).save()
schema = ln.Schema(
name="qc_metadata",
features=[count, condition],
maximal_set=True, # reject extra columns
).save()
df = pd.DataFrame({
"gene_count": [120, 130],
"condition": ["control", "treated"],
})
curator = ln.curators.DataFrameCurator(df, schema)
curator.validate() # raises on invalid data; do not use as an if condition
artifact = curator.save_artifact(key="experiments/qc.parquet")
assert artifact.schema == schema
pd.testing.assert_frame_equal(artifact.load(), df)
ln.finish()
This validates table structure/types, not whether the counts satisfy assay QC. Add assay-specific checks (units, allowed ranges, missingness, duplicate sample IDs, batch balance) before publication or downstream analysis.
Core objects and contracts
| Object | Purpose and important constraint |
|---|---|
Artifact |
A file/folder or serialized dataset; cache() gets a local path, load() materializes content, open() returns a format-specific accessor. |
Feature |
A typed metadata field; save its definition before artifact.features.set_values(...). |
Schema |
Validation rules and feature membership; maximal_set=True rejects extras. flexible=False alone does not. |
Record, ULabel |
Experimental entities and simple labels. A custom term is not an ontology assertion. |
Run, Transform |
An execution and its code definition. Inputs are run.input_artifacts; outputs are run.output_artifacts. |
Collection |
A versioned group of artifacts; iterate collection.artifacts.all(). |
Project, Branch, Space |
Grouping, change organization, and access scope; branches do not replace permissions. |
Use @ln.flow() for a workflow entry point and @ln.step() within it. Lineage
captures tracked accesses, not arbitrary reads outside LaminDB. Review
core concepts for tracking, labels, and revisions.
Failure patterns to avoid
…
자주 묻는 질문
‘아티팩트(artifact)’란 무엇인가요?
데이터셋이나 스크립트처럼 등록하는 파일이나 폴더입니다. LaminDB는 이러한 아티팩트를 추적합니다.
LaminDB는 어떻게 재현성을 보장하나요?
입력 데이터, 사용된 스크립트, 분석 매개변수를 추적해 완전한 기록을 만들므로, 작업을 다시 수행할 수 있습니다.
‘스키마’와 ‘특성’은 무엇인가요?
스키마는 데이터의 예상 구조(열과 형식)를 정의하며, 특성은 ‘유전자 수’나 ‘실험 조건’처럼 그 구조 안의 개별 필드입니다.
상세 정보
작성자의 원본 설명
Manages biological datasets and models with LaminDB, including artifact registration, lineage tracking, schema validation, Bionty ontology annotation, query/search, collections, branches, storage, and workflow integrations. Use for reproducible biological data curation or a LaminDB lakehouse.
인기도
- GitHub 스타
- 51k
- 순위
- #3485
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.