Skip to main content

Toolkit for processing genomic data files

Project description

TC PyTools

基因组数据处理工具集。

项目概述

本项目使用 uv 进行包管理和依赖管理,包含多个用于基因组数据处理的工具。

安装

前提条件

需要先安装 uv(快速的 Python 包管理器):

# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# 或使用 pip
pip install uv

安装工具包

方式 1: 开发模式安装(推荐用于开发)

# 进入项目目录
cd tc-pytools-v1.1

# 同步依赖并安装包(可编辑模式)
uv sync

# 此时可以直接使用 uv run 运行命令
uv run rename-ngdc-genome-id --help

方式 2: 安装到用户环境(推荐用于日常使用)

# 进入项目目录
cd tc-pytools-v1.1

# 使用 uv pip 安装到当前 Python 环境
uv pip install -e .

# 或安装到系统(需要激活相应的虚拟环境)
# 激活虚拟环境后
pip install -e .

# 安装后可以直接使用命令
rename-ngdc-genome-id --help

方式 3: 从源码构建并安装

# 构建包
uv build

# 安装构建的包
uv pip install dist/tc_pytools-1.1.0-py3-none-any.whl

工具列表

1. rename-ngdc-genome-id

重命名 NGDC 基因组 FASTA 和 GFF 文件中的染色体 ID。

快速使用

uv run rename-ngdc-genome-id -f genome.fasta -o output.fasta

详细文档: gtf/docs/README.md

开发

快速命令

make help          # 查看所有可用命令
make test          # 运行测试
make ci            # 运行完整 CI 检查
./ci.sh            # 运行本地 CI 脚本

测试

# 运行所有测试
uv run pytest

# 运行测试并生成覆盖率报告
uv run pytest --cov

# 查看 HTML 覆盖率报告
uv run pytest --cov --cov-report=html
# 打开 htmlcov/index.html

代码质量

# 代码格式化
make format

# 代码检查
make lint

# 类型检查
make type-check

本地 CI

项目提供三种本地 CI 方式:

  1. CI 脚本: ./ci.sh
  2. Make 命令: make ci
  3. Pre-commit: uv run pre-commit run --all-files

详细使用说明请参考 QUICKREF.md

项目结构

tc-pytools-v1.1/
├── gtf/                    # GTF 相关工具
│   ├── rename_ngdc_genome_id.py
│   ├── docs/              # 工具文档
│   └── tests/             # 单元测试
├── pyproject.toml         # 项目配置
├── Makefile              # Make 命令
├── ci.sh                 # CI 脚本
└── QUICKREF.md           # 快速参考

文档

许可证

MIT

Project details


Download files

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

Source Distribution

tc_pytools-1.1.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

tc_pytools-1.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file tc_pytools-1.1.0.tar.gz.

File metadata

  • Download URL: tc_pytools-1.1.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for tc_pytools-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7e1296d0ec2d13fa312c119cbf5b2764e54854631c599bf4604542b2a40fd07e
MD5 f735886ba55fa0fa5391066195834f61
BLAKE2b-256 792dbd93acdbabe7b3b5cb59326991ce3ffc36a89d5614501f48601b2029e899

See more details on using hashes here.

File details

Details for the file tc_pytools-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tc_pytools-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for tc_pytools-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8407859f40cb7f25ce246d94e824863ce681a5e098650c5fa53047a31a88b850
MD5 0f6d8a9b4665f91edc184cd6aa912496
BLAKE2b-256 c59e862462d169e3b4f269ce322335ea3d431d869042f00f31da65c3ac6c1720

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page