Giter Site home page Giter Site logo

yuanx749 / phasty Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 17 KB

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

Home Page: https://yuanx749.github.io/phasty/

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
package phylogenetics tool

phasty's Introduction

phasty

PyPI version Codacy Badge codecov

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

Description

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.

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:

pip install phasty

Or install from source after git clone:

cd phasty
pip install -e .

Run tests:

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

Uninstall:

pip uninstall phasty

Notes

This package uses Semantic Versioning.

phasty's People

Contributors

yuanx749 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.