dnanexus-integration by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill dnanexus-integrationDNAnexus 是一个用于生物医学数据分析和基因组学的云平台。您可以构建和部署应用程序/小程序,管理数据对象,运行工作流,并使用 dxpy Python SDK 进行基因组学流程的开发和执行。
在以下情况下应使用此技能:
此技能分为五个主要领域,每个领域都有详细的参考文档:
目的:创建可在 DNAnexus 平台上运行的可执行程序(应用程序/小程序)。
关键操作:
dx-app-wizard 生成应用程序骨架dx build 或 dx build --app 进行部署常见用例:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
参考:有关以下内容,请参阅 references/app-development.md:
目的:管理平台上的文件、记录和其他数据对象。
关键操作:
dxpy.upload_local_file() 和 dxpy.download_dxfile() 上传/下载文件常见用例:
参考:有关以下内容,请参阅 references/data-operations.md:
目的:运行分析、监控执行情况并编排工作流。
关键操作:
applet.run() 或 app.run() 启动作业常见用例:
参考:有关以下内容,请参阅 references/job-execution.md:
目的:通过 Python 以编程方式访问 DNAnexus 平台。
关键操作:
常见用例:
参考:有关以下内容,请参阅 references/python-sdk.md:
目的:配置应用程序元数据并管理依赖项。
关键操作:
常见用例:
参考:有关以下内容,请参阅 references/configuration.md:
import dxpy
# 上传输入文件
input_file = dxpy.upload_local_file("sample.fastq", project="project-xxxx")
# 运行分析
job = dxpy.DXApplet("applet-xxxx").run({
"reads": dxpy.dxlink(input_file.get_id())
})
# 等待完成
job.wait_on_done()
# 下载结果
output_id = job.describe()["output"]["aligned_reads"]["$dnanexus_link"]
dxpy.download_dxfile(output_id, "aligned.bam")
import dxpy
# 查找特定实验的 BAM 文件
files = dxpy.find_data_objects(
classname="file",
name="*.bam",
properties={"experiment": "exp001"},
project="project-xxxx"
)
# 下载每个文件
for file_result in files:
file_obj = dxpy.DXFile(file_result["id"])
filename = file_obj.describe()["name"]
dxpy.download_dxfile(file_result["id"], filename)
# src/my-app.py
import dxpy
import subprocess
@dxpy.entry_point('main')
def main(input_file, quality_threshold=30):
# 下载输入
dxpy.download_dxfile(input_file["$dnanexus_link"], "input.fastq")
# 处理
subprocess.check_call([
"quality_filter",
"--input", "input.fastq",
"--output", "filtered.fastq",
"--threshold", str(quality_threshold)
])
# 上传输出
output_file = dxpy.upload_local_file("filtered.fastq")
return {
"filtered_reads": dxpy.dxlink(output_file)
}
dxpy.run()
使用 DNAnexus 时,请遵循此决策树:
通常您需要同时使用多种能力(例如,应用程序开发 + 配置,或数据操作 + 作业执行)。
uv pip install dxpy
dx login
这将验证您的会话并设置对项目和数据的访问权限。
dx --version
dx whoami
使用相同的分析处理多个文件:
# 查找所有 FASTQ 文件
files = dxpy.find_data_objects(
classname="file",
name="*.fastq",
project="project-xxxx"
)
# 启动并行作业
jobs = []
for file_result in files:
job = dxpy.DXApplet("applet-xxxx").run({
"input": dxpy.dxlink(file_result["id"])
})
jobs.append(job)
# 等待所有作业完成
for job in jobs:
job.wait_on_done()
将多个分析链接在一起:
# 步骤 1:质量控制
qc_job = qc_applet.run({"reads": input_file})
# 步骤 2:比对(使用 QC 输出)
align_job = align_applet.run({
"reads": qc_job.get_output_ref("filtered_reads")
})
# 步骤 3:变异检测(使用比对输出)
variant_job = variant_applet.run({
"bam": align_job.get_output_ref("aligned_bam")
})
系统地组织分析结果:
# 创建有组织的文件夹结构
dxpy.api.project_new_folder(
"project-xxxx",
{"folder": "/experiments/exp001/results", "parents": True}
)
# 上传带元数据的文件
result_file = dxpy.upload_local_file(
"results.txt",
project="project-xxxx",
folder="/experiments/exp001/results",
properties={
"experiment": "exp001",
"sample": "sample1",
"analysis_date": "2025-10-20"
},
tags=["validated", "published"]
)
此技能包含详细的参考文档:
当您需要有关特定操作的详细信息或在处理复杂任务时,请加载这些参考文档。
每周安装次数
117
仓库
GitHub 星标
22.6K
首次出现
2026 年 1 月 21 日
安全审计
安装于
claude-code100
opencode93
gemini-cli89
cursor88
antigravity83
codex78
DNAnexus is a cloud platform for biomedical data analysis and genomics. Build and deploy apps/applets, manage data objects, run workflows, and use the dxpy Python SDK for genomics pipeline development and execution.
This skill should be used when:
The skill is organized into five main areas, each with detailed reference documentation:
Purpose : Create executable programs (apps/applets) that run on the DNAnexus platform.
Key Operations :
dx-app-wizarddx build or dx build --appCommon Use Cases :
Reference : See references/app-development.md for:
Purpose : Manage files, records, and other data objects on the platform.
Key Operations :
dxpy.upload_local_file() and dxpy.download_dxfile()Common Use Cases :
Reference : See references/data-operations.md for:
Purpose : Run analyses, monitor execution, and orchestrate workflows.
Key Operations :
applet.run() or app.run()Common Use Cases :
Reference : See references/job-execution.md for:
Purpose : Programmatic access to DNAnexus platform through Python.
Key Operations :
Common Use Cases :
Reference : See references/python-sdk.md for:
Purpose : Configure app metadata and manage dependencies.
Key Operations :
Common Use Cases :
Reference : See references/configuration.md for:
import dxpy
# Upload input file
input_file = dxpy.upload_local_file("sample.fastq", project="project-xxxx")
# Run analysis
job = dxpy.DXApplet("applet-xxxx").run({
"reads": dxpy.dxlink(input_file.get_id())
})
# Wait for completion
job.wait_on_done()
# Download results
output_id = job.describe()["output"]["aligned_reads"]["$dnanexus_link"]
dxpy.download_dxfile(output_id, "aligned.bam")
import dxpy
# Find BAM files from a specific experiment
files = dxpy.find_data_objects(
classname="file",
name="*.bam",
properties={"experiment": "exp001"},
project="project-xxxx"
)
# Download each file
for file_result in files:
file_obj = dxpy.DXFile(file_result["id"])
filename = file_obj.describe()["name"]
dxpy.download_dxfile(file_result["id"], filename)
# src/my-app.py
import dxpy
import subprocess
@dxpy.entry_point('main')
def main(input_file, quality_threshold=30):
# Download input
dxpy.download_dxfile(input_file["$dnanexus_link"], "input.fastq")
# Process
subprocess.check_call([
"quality_filter",
"--input", "input.fastq",
"--output", "filtered.fastq",
"--threshold", str(quality_threshold)
])
# Upload output
output_file = dxpy.upload_local_file("filtered.fastq")
return {
"filtered_reads": dxpy.dxlink(output_file)
}
dxpy.run()
When working with DNAnexus, follow this decision tree:
Need to create a new executable?
Need to manage files or data?
Need to run an analysis or workflow?
Writing Python scripts for automation?
Configuring app settings or dependencies?
Often you'll need multiple capabilities together (e.g., app development + configuration, or data operations + job execution).
uv pip install dxpy
dx login
This authenticates your session and sets up access to projects and data.
dx --version
dx whoami
Process multiple files with the same analysis:
# Find all FASTQ files
files = dxpy.find_data_objects(
classname="file",
name="*.fastq",
project="project-xxxx"
)
# Launch parallel jobs
jobs = []
for file_result in files:
job = dxpy.DXApplet("applet-xxxx").run({
"input": dxpy.dxlink(file_result["id"])
})
jobs.append(job)
# Wait for all completions
for job in jobs:
job.wait_on_done()
Chain multiple analyses together:
# Step 1: Quality control
qc_job = qc_applet.run({"reads": input_file})
# Step 2: Alignment (uses QC output)
align_job = align_applet.run({
"reads": qc_job.get_output_ref("filtered_reads")
})
# Step 3: Variant calling (uses alignment output)
variant_job = variant_applet.run({
"bam": align_job.get_output_ref("aligned_bam")
})
Organize analysis results systematically:
# Create organized folder structure
dxpy.api.project_new_folder(
"project-xxxx",
{"folder": "/experiments/exp001/results", "parents": True}
)
# Upload with metadata
result_file = dxpy.upload_local_file(
"results.txt",
project="project-xxxx",
folder="/experiments/exp001/results",
properties={
"experiment": "exp001",
"sample": "sample1",
"analysis_date": "2025-10-20"
},
tags=["validated", "published"]
)
This skill includes detailed reference documentation:
Load these references when you need detailed information about specific operations or when working on complex tasks.
Weekly Installs
117
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code100
opencode93
gemini-cli89
cursor88
antigravity83
codex78
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
94,100 周安装
Flutter Material 3 主题迁移与样式管理指南 - 组件更新与跨平台优化
1,100 周安装
Flutter导航与路由实现指南:命令式、声明式与嵌套导航策略
1,100 周安装
Flutter动画实现指南:隐式/显式/物理/Hero/交错动画策略与代码示例
1,100 周安装
百度AI搜索技能:集成百度千帆平台,支持网页/百科/AI智能搜索,提升开发效率
1,100 周安装
AI提示词查找与优化工具 - 搜索、获取、改进ChatGPT提示词模板
1,100 周安装
日历自动化:Google Calendar与Outlook会议管理、时间块划分、每日摘要同步工作流
1,100 周安装