From b2d9cc349a7c2e6c2ddf6b670ce853cb1660ac9a Mon Sep 17 00:00:00 2001 From: padix-key Date: Fri, 20 Sep 2019 14:53:16 +0200 Subject: [PATCH 1/2] Bumbed minor version --- src/biotite/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biotite/__init__.py b/src/biotite/__init__.py index 389bb21d1..081af1b7e 100644 --- a/src/biotite/__init__.py +++ b/src/biotite/__init__.py @@ -9,7 +9,7 @@ modules. """ -__version__ = "0.16.0" +__version__ = "0.17.0" __author__ = "Patrick Kunzmann" from .file import * From daa2f163e91b4525bd15393e8712dc571c9d8380 Mon Sep 17 00:00:00 2001 From: padix-key Date: Fri, 20 Sep 2019 14:56:22 +0200 Subject: [PATCH 2/2] 'mmcif' is allowed format identifier --- src/biotite/database/rcsb/download.py | 7 +++++-- src/biotite/sequence/align/alignment.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/biotite/database/rcsb/download.py b/src/biotite/database/rcsb/download.py index 4fb292142..b08526082 100644 --- a/src/biotite/database/rcsb/download.py +++ b/src/biotite/database/rcsb/download.py @@ -29,7 +29,10 @@ def fetch(pdb_ids, format, target_path=None, overwrite=False, verbose=False): to be downloaded . format : str The format of the files to be downloaded. - 'pdb', 'pdbx', 'cif' or 'mmtf' are allowed. + ``'pdb'``, ``'pdbx'``, ``'cif'``, ``'mmcif'`` or ``'mmtf'`` + are allowed. + However, ``'pdbx'``, ``'cif'`` and ``'mmcif'`` are synonyms for + the same format. target_path : str, optional The target directory of the downloaded files. By default, the file content is stored in a file-like object @@ -99,7 +102,7 @@ def fetch(pdb_ids, format, target_path=None, overwrite=False, verbose=False): else: with open(file, "w+") as f: f.write(content) - elif format == "cif" or format == "pdbx": + elif format in ["cif", "mmcif", "pdbx"]: r = requests.get(_standard_url + id + ".cif") content = r.text _assert_valid_file(content, id) diff --git a/src/biotite/sequence/align/alignment.py b/src/biotite/sequence/align/alignment.py index 8da71f0b8..5119cf033 100644 --- a/src/biotite/sequence/align/alignment.py +++ b/src/biotite/sequence/align/alignment.py @@ -350,7 +350,7 @@ def get_sequence_identity(alignment, mode="not_terminal"): if len(np.unique(column)) == 1: matches += 1 - #Calculate iddentity + #Calculate identity if mode == "shortest": shortest_length = min([len(seq) for seq in alignment.sequences]) return matches / shortest_length