omics-kit
组学数据分析的命令行小工具集,每个工具都是 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
依赖
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/
新增一个子命令
- 在
src/omics_kit/<tool>/下写模块,暴露get_parser()和main(argv); - 在
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52a54f26cd7f536fe794a91098bb5c0de371860e00b08881abfb88e49e0553e5
|
|
| MD5 |
462e3f09adc23c4abe2e5cb36d967918
|
|
| BLAKE2b-256 |
c871f598e7a121f41ea35c900fb553cfe5a9b0cd0eddce0b4fe160b0da2b4ac8
|
Provenance
The following attestation bundles were made for omics_kit-0.1.0.tar.gz:
Publisher:
publish.yml on typekey/omics-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omics_kit-0.1.0.tar.gz -
Subject digest:
52a54f26cd7f536fe794a91098bb5c0de371860e00b08881abfb88e49e0553e5 - Sigstore transparency entry: 2361847204
- Sigstore integration time:
-
Permalink:
typekey/omics-kit@d90c48677f62fa9eb16cbc02b9df4f5941d75880 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/typekey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d90c48677f62fa9eb16cbc02b9df4f5941d75880 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada07830f4538038dbf5b75b72cece67b5e3bb09c5ae396c95faa14e46856018
|
|
| MD5 |
ffaac3c2a2fd4900ba0157faa45002bc
|
|
| BLAKE2b-256 |
6ed19277a4ccd9d828e1f3720c6df0c8d4a7ec67cd1cdbdcbbb61924bac70937
|
Provenance
The following attestation bundles were made for omics_kit-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on typekey/omics-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omics_kit-0.1.0-py3-none-any.whl -
Subject digest:
ada07830f4538038dbf5b75b72cece67b5e3bb09c5ae396c95faa14e46856018 - Sigstore transparency entry: 2361847213
- Sigstore integration time:
-
Permalink:
typekey/omics-kit@d90c48677f62fa9eb16cbc02b9df4f5941d75880 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/typekey
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d90c48677f62fa9eb16cbc02b9df4f5941d75880 -
Trigger Event:
push
-
Statement type: