From 570d902bbc214a30f18b93adf735c46836611bf5 Mon Sep 17 00:00:00 2001 From: benhid Date: Thu, 6 Feb 2020 17:27:49 +0100 Subject: [PATCH] Release version 0.8.1 --- README.md | 2 +- examples/runner.py | 3 +-- pymsa/__init__.py | 8 +++--- pymsa/benchmark.py | 59 --------------------------------------------- pymsa/util/fasta.py | 2 -- setup.py | 21 ++++++++++------ 6 files changed, 19 insertions(+), 76 deletions(-) delete mode 100644 pymsa/benchmark.py diff --git a/README.md b/README.md index 417048d..4b3d5de 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # Scoring Multiple Sequence Alignments with Python [![Build Status](https://img.shields.io/travis/benhid/pyMSA.svg?style=flat-square)](https://travis-ci.org/benhid/pyMSA) [![PyPI License](https://img.shields.io/pypi/l/pyMSA.svg?style=flat-square)]() -[![PyPI Python version](https://img.shields.io/pypi/pyversions/pyMSA.svg?style=flat-square)]() +[![PyPI Python version](https://img.shields.io/pypi/pyversions/pyMSA.svg?style=flat-square)](https://pypi.org/project/pyMSA/) pyMSA is an open source software tool aimed at providing a number of scores for multiple sequence alignment (MSA) problems. A [tutorial](resources/tutorial-pymsa.pdf) about pyMSA is available in the resources folder of the proyect. diff --git a/examples/runner.py b/examples/runner.py index febdcbb..5c40b92 100644 --- a/examples/runner.py +++ b/examples/runner.py @@ -1,6 +1,5 @@ -from pymsa import Entropy, PercentageOfNonGaps, PercentageOfTotallyConservedColumns, Star, SumOfPairs +from pymsa import MSA, Entropy, PercentageOfNonGaps, PercentageOfTotallyConservedColumns, Star, SumOfPairs from pymsa import PAM250, Blosum62, FileMatrix -from pymsa.core.msa import MSA from pymsa.util.fasta import print_alignment diff --git a/pymsa/__init__.py b/pymsa/__init__.py index 25ecf69..1f59a1f 100644 --- a/pymsa/__init__.py +++ b/pymsa/__init__.py @@ -1,11 +1,11 @@ -from .core.score import Score, SumOfPairs, Star, Entropy, Strike, PercentageOfNonGaps, PercentageOfTotallyConservedColumns +from .core.msa import MSA +from .core.score import SumOfPairs, Star, Entropy, Strike, PercentageOfNonGaps, PercentageOfTotallyConservedColumns from .core.substitution_matrix import SubstitutionMatrix, FileMatrix, PAM250, Blosum62 from .util.fasta import read_fasta_file_as_list_of_pairs, print_alignment -from .util.tool import Tool, StrikeEx __all__ = [ - 'Score', 'SumOfPairs', 'Star', 'Strike', 'Entropy', 'PercentageOfNonGaps', 'PercentageOfTotallyConservedColumns', + 'MSA', + 'SumOfPairs', 'Star', 'Strike', 'Entropy', 'PercentageOfNonGaps', 'PercentageOfTotallyConservedColumns', 'SubstitutionMatrix', 'FileMatrix', 'PAM250', 'Blosum62', 'read_fasta_file_as_list_of_pairs', 'print_alignment', - 'Tool', 'StrikeEx' ] diff --git a/pymsa/benchmark.py b/pymsa/benchmark.py deleted file mode 100644 index 1366361..0000000 --- a/pymsa/benchmark.py +++ /dev/null @@ -1,59 +0,0 @@ -import click - -from pymsa import PercentageOfNonGaps, PercentageOfTotallyConservedColumns, read_fasta_file_as_list_of_pairs, \ - print_alignment, SumOfPairs, Entropy, Star, PAM250, Blosum62 - - -@click.command() -@click.option( - '--input_fasta', - '-i', - type=click.File('r'), - help='Input file in FASTA format.', -) -@click.option( - '--show', - '-s', - default=True, - help='Whether you want to print the input alignment or not.' -) -def benchmark(input_fasta, show: bool): - msa = read_fasta_file_as_list_of_pairs(input_fasta.name) - - aligned_sequences = list(pair[1] for pair in msa) - sequences_id = list(pair[0] for pair in msa) - - if show: - print_alignment(aligned_sequences, sequences_id) - - # Percentage of non-gaps and totally conserved columns - non_gaps = PercentageOfNonGaps() - totally_conserved_columns = PercentageOfTotallyConservedColumns() - - percentage = non_gaps.compute(aligned_sequences) - print("Percentage of non-gaps: {0} %".format(percentage)) - - conserved = totally_conserved_columns.compute(aligned_sequences) - print("Percentage of totally conserved columns: {0}".format(conserved)) - - # Entropy - value = Entropy().compute(aligned_sequences=aligned_sequences) - print("Entropy score: {0}".format(value)) - - # Sum of pairs - value = SumOfPairs(Blosum62()).compute(aligned_sequences=aligned_sequences) - print("Sum of Pairs score (Blosum62): {0}".format(value)) - - value = SumOfPairs(PAM250()).compute(aligned_sequences=aligned_sequences) - print("Sum of Pairs score (PAM250): {0}".format(value)) - - # Star - value = Star(Blosum62()).compute(aligned_sequences=aligned_sequences) - print("Star score (Blosum62): {0}".format(value)) - - value = Star(PAM250()).compute(aligned_sequences=aligned_sequences) - print("Star score (PAM250): {0}".format(value)) - - -if __name__ == '__main__': - benchmark() diff --git a/pymsa/util/fasta.py b/pymsa/util/fasta.py index 04db60f..27e8b54 100644 --- a/pymsa/util/fasta.py +++ b/pymsa/util/fasta.py @@ -1,5 +1,3 @@ -from typing import List - from pymsa.core.msa import MSA diff --git a/setup.py b/setup.py index 344e420..30bec9d 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,25 @@ -from setuptools import setup, find_packages +from os.path import abspath, dirname, join + +from setuptools import find_packages, setup + +basedir = abspath(dirname(__file__)) + +with open(join(basedir, 'README.md'), encoding='utf-8') as f: + README = f.read() setup( name='pyMSA', - version='0.8', + version='0.8.1', description='Scoring Multiple Sequence Alignments with Python', + long_description=README, + long_description_content_type='text/markdown', author='Antonio Benítez-Hidalgo, Antonio J. Nebro', author_email='antonio.b@uma.es', maintainer='Antonio Benítez-Hidalgo', - maintainer_email='antonio.b@uma.es', + maintainer_email='antonio.benitez@lcc.uma.es', license='MIT', url='https://github.com/benhid/pyMSA', - long_description=open('README.md').read(), packages=find_packages(exclude=["test.*", "tests"]), - python_requires='>=3', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Research', @@ -20,7 +27,5 @@ 'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Programming Language :: Python :: 3.6' ], - install_requires=[ - 'click' - ] + python_requires='>=3' ) \ No newline at end of file