phasty


Namephasty JSON
Version 0.5.3 PyPI version JSON
download
home_pagehttps://github.com/yuanx749/phasty
SummaryA Python interface for PHAST (phylogenetic analysis with space/time models).
upload_time2023-11-15 05:24:28
maintainer
docs_urlNone
authorXiao Yuan
requires_python>=3.8
licenseBSD 3-Clause License
keywords phylogenetics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # phasty

[![PyPI version](https://badge.fury.io/py/phasty.svg)](https://badge.fury.io/py/phasty)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/319819871685432882de8aa62c58fec0)](https://app.codacy.com/gh/yuanx749/phasty/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![codecov](https://codecov.io/gh/yuanx749/phasty/branch/main/graph/badge.svg?token=NT7LUW1ECF)](https://codecov.io/gh/yuanx749/phasty)

A Python interface for PHAST (phylogenetic analysis with space/time models).

## Description

[PHAST](http://compgen.cshl.edu/phast/) is a package consisting of command-line programs for comparative genomics. It supports several nucleotide substitution models. This package phasty provides Python wrappers for some major programs so that it is easier to integrate them into complicated workflows. It can also parse some files from plain text to more computer-friendly forms to help downstream analysis.

## Usage

The design idea of phasty is to be robust and compatible with version changes of PHAST. Therefore, the signatures of functions are written in a general way. Please refer to the corresponding websites for detailed usage of specific options.

### Example

Assume `hmrc.fa` exists in the current directory. After running `phylo_fit` and reading the .mod file, the content is stored in a list of objects holding attributes with proper data types. Each object represents a fitted model.

```Python
from phasty import phylo_fit, parse_mod

output = phylo_fit(
    "hmrc.fa",
    tree="((human,(mouse,rat)),cow)",
    subst_mod="U2S",
    EM=True,
    precision="MED",
    non_overlapping=True,
    out_root="hmrc-u2s",
)

mod_lst = parse_mod("hmrc-u2s.mod")
print(mod_lst[0].rate_mat)
```

## Installation

Download and install PHAST first.

Install from PyPI:

```bash
pip install phasty
```

Or install from source after git clone:

```bash
cd phasty
pip install -e .
```

Run tests:

```bash
pip install -e .[dev]
python -m pytest --cov=phasty tests/
```

Uninstall:

```bash
pip uninstall phasty
```

## Notes

This package uses [Semantic Versioning](https://semver.org/).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yuanx749/phasty",
    "name": "phasty",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "phylogenetics",
    "author": "Xiao Yuan",
    "author_email": "yuanx749@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3f/da/eede2972d57b8bfc39fafd7e6ceed714c416b5ef94e385fc1ad20de7e9cb/phasty-0.5.3.tar.gz",
    "platform": null,
    "description": "# phasty\r\n\r\n[![PyPI version](https://badge.fury.io/py/phasty.svg)](https://badge.fury.io/py/phasty)\r\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/319819871685432882de8aa62c58fec0)](https://app.codacy.com/gh/yuanx749/phasty/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\r\n[![codecov](https://codecov.io/gh/yuanx749/phasty/branch/main/graph/badge.svg?token=NT7LUW1ECF)](https://codecov.io/gh/yuanx749/phasty)\r\n\r\nA Python interface for PHAST (phylogenetic analysis with space/time models).\r\n\r\n## Description\r\n\r\n[PHAST](http://compgen.cshl.edu/phast/) is a package consisting of command-line programs for comparative genomics. It supports several nucleotide substitution models. This package phasty provides Python wrappers for some major programs so that it is easier to integrate them into complicated workflows. It can also parse some files from plain text to more computer-friendly forms to help downstream analysis.\r\n\r\n## Usage\r\n\r\nThe design idea of phasty is to be robust and compatible with version changes of PHAST. Therefore, the signatures of functions are written in a general way. Please refer to the corresponding websites for detailed usage of specific options.\r\n\r\n### Example\r\n\r\nAssume `hmrc.fa` exists in the current directory. After running `phylo_fit` and reading the .mod file, the content is stored in a list of objects holding attributes with proper data types. Each object represents a fitted model.\r\n\r\n```Python\r\nfrom phasty import phylo_fit, parse_mod\r\n\r\noutput = phylo_fit(\r\n    \"hmrc.fa\",\r\n    tree=\"((human,(mouse,rat)),cow)\",\r\n    subst_mod=\"U2S\",\r\n    EM=True,\r\n    precision=\"MED\",\r\n    non_overlapping=True,\r\n    out_root=\"hmrc-u2s\",\r\n)\r\n\r\nmod_lst = parse_mod(\"hmrc-u2s.mod\")\r\nprint(mod_lst[0].rate_mat)\r\n```\r\n\r\n## Installation\r\n\r\nDownload and install PHAST first.\r\n\r\nInstall from PyPI:\r\n\r\n```bash\r\npip install phasty\r\n```\r\n\r\nOr install from source after git clone:\r\n\r\n```bash\r\ncd phasty\r\npip install -e .\r\n```\r\n\r\nRun tests:\r\n\r\n```bash\r\npip install -e .[dev]\r\npython -m pytest --cov=phasty tests/\r\n```\r\n\r\nUninstall:\r\n\r\n```bash\r\npip uninstall phasty\r\n```\r\n\r\n## Notes\r\n\r\nThis package uses [Semantic Versioning](https://semver.org/).\r\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "A Python interface for PHAST (phylogenetic analysis with space/time models).",
    "version": "0.5.3",
    "project_urls": {
        "Homepage": "https://github.com/yuanx749/phasty"
    },
    "split_keywords": [
        "phylogenetics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "869994253ec79ab61aa978cf66b6e7100493450da40a7a19de68f0edf87eb8be",
                "md5": "2d4a686ccb3892b84e004e1c8eb9eaa2",
                "sha256": "ebab77ddf314aadbf7b39fda55a9379a82737fae8bbbd8bc756bc898d352d2c0"
            },
            "downloads": -1,
            "filename": "phasty-0.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d4a686ccb3892b84e004e1c8eb9eaa2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5624,
            "upload_time": "2023-11-15T05:24:26",
            "upload_time_iso_8601": "2023-11-15T05:24:26.783676Z",
            "url": "https://files.pythonhosted.org/packages/86/99/94253ec79ab61aa978cf66b6e7100493450da40a7a19de68f0edf87eb8be/phasty-0.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3fdaeede2972d57b8bfc39fafd7e6ceed714c416b5ef94e385fc1ad20de7e9cb",
                "md5": "3f01d8b6e0b8ce1c7f354fa90f1074d5",
                "sha256": "d92f5856f60848d664e92dae8f967adcfb20a727a7ff415d4d6f36b8a4d4f76d"
            },
            "downloads": -1,
            "filename": "phasty-0.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3f01d8b6e0b8ce1c7f354fa90f1074d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6014,
            "upload_time": "2023-11-15T05:24:28",
            "upload_time_iso_8601": "2023-11-15T05:24:28.313408Z",
            "url": "https://files.pythonhosted.org/packages/3f/da/eede2972d57b8bfc39fafd7e6ceed714c416b5ef94e385fc1ad20de7e9cb/phasty-0.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 05:24:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yuanx749",
    "github_project": "phasty",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "phasty"
}
        
Elapsed time: 0.29869s