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.pyCOMMANDS 里加一行(模块路径 + 一句话描述)。

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

发布

打 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omics_kit-0.1.0.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omics_kit-0.1.0-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file omics_kit-0.1.0.tar.gz.

File metadata

  • Download URL: omics_kit-0.1.0.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for omics_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 52a54f26cd7f536fe794a91098bb5c0de371860e00b08881abfb88e49e0553e5
MD5 462e3f09adc23c4abe2e5cb36d967918
BLAKE2b-256 c871f598e7a121f41ea35c900fb553cfe5a9b0cd0eddce0b4fe160b0da2b4ac8

See more details on using hashes here.

Provenance

The following attestation bundles were made for omics_kit-0.1.0.tar.gz:

Publisher: publish.yml on typekey/omics-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omics_kit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: omics_kit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for omics_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ada07830f4538038dbf5b75b72cece67b5e3bb09c5ae396c95faa14e46856018
MD5 ffaac3c2a2fd4900ba0157faa45002bc
BLAKE2b-256 6ed19277a4ccd9d828e1f3720c6df0c8d4a7ec67cd1cdbdcbbb61924bac70937

See more details on using hashes here.

Provenance

The following attestation bundles were made for omics_kit-0.1.0-py3-none-any.whl:

Publisher: publish.yml on typekey/omics-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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