目录

Language [![Python Versions][python-versions-badge]][python-versions-link] [![Code Style][code-style-badge]][code-style-link] [![Type Checked][type-checking-badge]][type-checking-link] [![PEP8][pep-8-badge]][pep-8-link] [![Poetry][poetry-badge]][poetry-link] [![License][license-badge]][license-link]


[![Python package][python-package-badge]][python-package-link] [![PyPI version][pypi-badge]][pypi-link] [![PyPI download total][pypi-downloads-badge]][pypi-downloads-link] [![Bioconda][bioconda-badge]][bioconda-link] [![DOI][zenodo-badge]][zenodo-link]


[python-versions-badge]: //NSCCN/fgsmk/tree/main/https:/img.shields.io/badge/python-3.11_|3.12-blue|]: //NSCCN/fgsmk/tree/main/https:/img.shields.io/badge/python-3.11|_3.12-blue [python-versions-link]: //NSCCN/fgsmk/tree/main/https:/github.com/fulcrumgenomics/fgsmk/blob/main/pyproject.toml [code-style-badge]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json [code-style-link]: https://docs.astral.sh/ruff/ [type-checking-badge]: https://www.gitlink.org.cn/api/NSCCN/fgsmk/raw/http:/www.mypy-lang.org/static/mypy_badge.svg?ref=main [type-checking-link]: //NSCCN/fgsmk/tree/main/http:/mypy-lang.org [pep-8-badge]: https://img.shields.io/badge/code%20style-pep8-brightgreen [pep-8-link]: https://www.python.org/dev/peps/pep-0008/ [poetry-badge]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json [poetry-link]: //NSCCN/fgsmk/tree/main/https:/python-poetry.org [license-badge]: https://img.shields.io/badge/license-MIT-blue [license-link]: https://github.com/fulcrumgenomics/fgsmk/blob/main/LICENSE [python-package-badge]: https://github.com/fulcrumgenomics/fgsmk/actions/workflows/python_package.yml/badge.svg?branch=main [python-package-link]: //NSCCN/fgsmk/tree/main/https:/github.com/fulcrumgenomics/fgsmk/actions/workflows/python_package.yml [pypi-badge]: https://www.gitlink.org.cn/api/NSCCN/fgsmk/raw/https:/badge.fury.io/py/fgsmk.svg?ref=main [pypi-link]: https://pypi.python.org/pypi/fgsmk [pypi-downloads-badge]: https://img.shields.io/pypi/dm/fgsmk [pypi-downloads-link]: https://pypi.python.org/pypi/fgsmk [bioconda-badge]: https://img.shields.io/conda/dn/bioconda/fgsmk.svg?label=Bioconda [bioconda-link]: //NSCCN/fgsmk/tree/main/http:/bioconda.github.io/recipes/fgsmk/README.html [zenodo-badge]: https://www.gitlink.org.cn/api/NSCCN/fgsmk/raw/https:/zenodo.org/badge/916232349.svg?ref=main [zenodo-link]: //NSCCN/fgsmk/tree/main/https:/doi.org/10.5281/zenodo.15558165

fgsmk

A set of utility functions for use in Snakemake workflows. Supports Snakemake 8+.

Table of Contents

This package is intended for use within a Snakemake workflow project.

Install the Python package and dependency management tool poetry using official documentation. You must have Python 3.11 or greater available on your system path, which could be managed by mamba, pyenv, or another package manager.

If you have a mamba environment for the parent project, activate it first.

Install with poetry.

poetry install

Usage

Error summary file

Set the onerror directive in a Snakemake workflow to point to the fgsmk.on_error function.

from fgsmk.log import on_error

onerror:
    on_error(snakefile=Path(__file__), config=config, log=Path(log))
    """Block of code that gets called if the snakemake pipeline exits with an error."""

This will produce a file error_summary.txt containing the last (up to) 50 lines of the log files of any rules that failed execution. The content will also be output to stdout.

Development and Testing

See the contributing guide for more information.

关于

面向生物信息分析任务的流程脚本或 Snakemake 封装工具。

265.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号