Skip to main content

TMKit is a scalable Python programming interface holding a bundle of function modules to allow a variety of transmembrane protein studies.

Project description


Test Coverage Report Dependencies Status Code style: black Security: bandit Anaconda run with docker Downloads

tags: bioinformatics, protein-protein interfaces

Overview

 _____ __  __ _  ___ _
|_   _|  \/  | |/ (_) |_
  | | | |\/| | ' /| | __|
  | | | |  | | . \| | |_
  |_| |_|  |_|_|\_\_|\__|

TMKit is a scalable Python programming interface holding a bundle of function modules to allow a variety of transmembrane protein studies.

Documentation

Website: https://tmkit-guide.herokuapp.com/doc/overview

Source: https://github.com/2003100127/tmkit-guide

We also provided a jupyter notebook (examples.ipynb) to demonstrate the usage of TMKit.

Installation

Using pip (recommended)

# create a conda environment
conda create --name tmkit python=3.10

# activate the conda environment
conda activate tmkit

# a stable version 0.0.5 (recommended)
pip install tmkit==0.0.5

Using conda

If you want to install TMKit with some optional packages, including hh-suite, pymol, and hmmer, you can select the conda option. You should have miniconda installed first. Please run the following commands to create a new conda environment and install TMKit.

# create a conda environment
conda create --name tmkit python=3.10

# activate the conda environment
conda activate tmkit

conda install -c 2003100127 -c conda-forge -c bioconda tmkit

Using docker

You can also use docker to run TMKit. You should have docker installed first. Then run the following commands to pull the docker image.

docker pull 2003100127/tmkit:latest

For developers

If you want to contribute to TMKit, be sure to review the contribution guidelines. Please fork the repository and create a new branch for development. We provided a docker image and a Makefile to help you get started quickly. After cloned the repo and connected to the docker container, you can run the following commands to get started.

# install poetry
make poetry-download

# create a virtual environment
make create-venv

# install dependencies
make install

# install pre-commit hooks
make pre-commit-install

# happy coding :)
# ...

# after coding, run the following commands to check your code before making a pull request
make test

The development environment is managed by Poetry. pre-commit is used to manage the git hooks, which include code formatting, linting, security check, etc, and is configured in the .pre-commit-config.yaml file. Using pre-commit is highly recommended to ensure the code quality.

Makefile usage

Makefile contains a lot of functions for faster development.

1. Download and remove Poetry

To download and install Poetry run:

make poetry-download

To uninstall

make poetry-remove

2. Install all dependencies and pre-commit hooks

Install requirements:

make install

Pre-commit hooks coulb be installed after git init via

make pre-commit-install

3. Codestyle

Automatic formatting uses pyupgrade, isort and black.

make codestyle

# or use synonym
make formatting

Codestyle checks only, without rewriting files:

make check-codestyle

Note: check-codestyle uses isort, black and darglint library

Update all dev libraries to the latest version using one comand

make update-dev-deps

4. Code security

make check-safety

This command launches Poetry integrity checks as well as identifies security issues with Safety and Bandit.

make check-safety

5. Type checks

Run mypy static type checker

make mypy

6. Tests with coverage badges

Run pytest

make test

7. All linters

Of course there is a command to rule run all linters in one:

make lint

the same as:

make test && make check-codestyle && make mypy && make check-safety

8. Docker

make docker-build

which is equivalent to:

make docker-build VERSION=latest

Remove docker image with

make docker-remove

More information about docker.

9. Cleanup

Delete pycache files

make pycache-remove

Remove package build

make build-remove

Delete .DS_STORE files

make dsstore-remove

Remove .mypycache

make mypycache-remove

Or to remove all above run:

make cleanup

Citation

Please cite our work if you use TMKit in your research.

Contact

Please report any questions on issue pages.

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

tmkit-0.0.5.tar.gz (120.3 kB view hashes)

Uploaded Source

Supported by

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