Skip to main content

omics-kit

PyPI Python License

组学数据分析的命令行小工具集,每个工具都是 omics-kit 的一个子命令。

pip install omics-kit
omics-kit                       # 列出所有子命令
omics-kit rna-structure -h      # 单个子命令的参数

子命令

子命令 说明 文档
rna-structure 用 VARNA 画 RNA 二级结构,支持 motif 高亮、RNAcentral/R2DT 直连、RNAfold 折叠 docs/rna-structure.md
rnacentral-fetch 从 RNAcentral 取序列 + R2DT 二级结构,写成 dbn docs/rna-structure.md

上手

# 从 RNAcentral 编号直接出图,并高亮三个 motif
omics-kit rna-structure -r URS00000DE3E2/9606 -o SNORA73A.svg \
    -m "7BM:18-31:#E8DAA6:#93C795" \
    -m "MBM:117-126:#EFB9C6:#93C795" \
    -m "Ψ pocket:143-152,186-192:fill=#AED6EA,outline=#93C795,type=L"

# 复现 Cell 2025 Figure 4A(motif 表已随包分发)
omics-kit rnacentral-fetch -r URS00000DE3E2/9606 -n SNORA73A -o SNORA73A.dbn
omics-kit rna-structure -i SNORA73A.dbn -M SNORA73A_figure4A -o figure4A.png \
    --title "SNORA73A structure" --title-size 14 --resolution 4

SNORA73A

依赖

Python 侧只依赖 termcolor,其余按需:

工具 外部依赖 说明
rna-structure Java 1.6+ 运行 VARNA;jar 首次使用时自动下载到 ~/.cache/omics-kit/varna(可用 $VARNA_JAR 或 --jar 指定)
rna-structure --fold ViennaRNA 只有需要现场折叠时才用到 RNAfold

开发

git clone https://github.com/typekey/omics-kit.git
cd omics-kit
pip install -e .

python3 -m unittest discover -s tests -v            # 全部用例(联网 + 渲染)
OMICS_SKIP_NETWORK=1 python3 -m unittest discover -s tests   # 离线用例
python3 -m build                                    # 构建 wheel/sdist 到 dist/

新增一个子命令

  1. 在 src/omics_kit/<tool>/ 下写模块,暴露 get_parser() 和 main(argv);
  2. 在 src/omics_kit/cli.py 的 COMMANDS 里加一行(模块路径 + 一句话描述)。

模块是懒加载的,重依赖的工具不会拖慢其它子命令。

发布

打 tag 推上去即可,GitHub Action 会构建并通过 PyPI Trusted Publishing 发布:

git tag v0.1.0 && git push origin v0.1.0

引用

  • VARNA:Darty K, Denise A, Ponty Y. VARNA: Interactive drawing and editing of the RNA secondary structure. Bioinformatics 2009, 25(15):1974-1975.
  • R2DT / RNAcentral:Sweeney BA, et al. R2DT is a framework for predicting and visualising RNA secondary structure using templates. Nat Commun 2021, 12:3494.

License

Apache-2.0

Metadata

Release files for omics-kit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omics-kit 0.1.0
File Size Uploaded Provenance Actions
omics_kit-0.1.0.tar.gz 30.8 kB With provenance Details for omics_kit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omics-kit 0.1.0
File Interpreter ABI Platform Actions
omics_kit-0.1.0-py3-none-any.whl Python 3 none any Details for omics_kit-0.1.0-py3-none-any.whl

Total release size: 59.5 kB

Release files / omics_kit-0.1.0.tar.gz

Download URL omics_kit-0.1.0.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
52a54f26cd7f536fe794a91098bb5c0de371860e00b08881abfb88e49e0553e5
BLAKE2b-256 checksum
How to use checksums
c871f598e7a121f41ea35c900fb553cfe5a9b0cd0eddce0b4fe160b0da2b4ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / omics_kit-0.1.0-py3-none-any.whl

Download URL omics_kit-0.1.0-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ada07830f4538038dbf5b75b72cece67b5e3bb09c5ae396c95faa14e46856018
BLAKE2b-256 checksum
How to use checksums
6ed19277a4ccd9d828e1f3720c6df0c8d4a7ec67cd1cdbdcbbb61924bac70937
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Security for omics-kit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for omics_kit-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page