biotite 1.0.1__cp312-cp312-macosx_11_0_arm64.whl → 1.2.0__cp312-cp312-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of biotite might be problematic. Click here for more details.
- biotite/application/application.py +3 -3
- biotite/application/autodock/app.py +1 -1
- biotite/application/blast/webapp.py +1 -1
- biotite/application/clustalo/app.py +1 -1
- biotite/application/dssp/app.py +13 -3
- biotite/application/localapp.py +36 -2
- biotite/application/msaapp.py +10 -10
- biotite/application/muscle/app3.py +5 -18
- biotite/application/muscle/app5.py +5 -5
- biotite/application/sra/app.py +0 -5
- biotite/application/util.py +22 -2
- biotite/application/viennarna/rnaalifold.py +8 -8
- biotite/application/viennarna/rnaplot.py +9 -3
- biotite/application/viennarna/util.py +1 -1
- biotite/application/webapp.py +1 -1
- biotite/database/afdb/__init__.py +12 -0
- biotite/database/afdb/download.py +191 -0
- biotite/database/entrez/dbnames.py +10 -0
- biotite/database/entrez/download.py +9 -10
- biotite/database/entrez/key.py +1 -1
- biotite/database/entrez/query.py +5 -4
- biotite/database/pubchem/download.py +6 -6
- biotite/database/pubchem/error.py +10 -0
- biotite/database/pubchem/query.py +12 -23
- biotite/database/rcsb/download.py +3 -2
- biotite/database/rcsb/query.py +8 -9
- biotite/database/uniprot/check.py +22 -17
- biotite/database/uniprot/download.py +3 -6
- biotite/database/uniprot/query.py +4 -5
- biotite/file.py +14 -2
- biotite/interface/__init__.py +19 -0
- biotite/interface/openmm/__init__.py +16 -0
- biotite/interface/openmm/state.py +93 -0
- biotite/interface/openmm/system.py +227 -0
- biotite/interface/pymol/__init__.py +198 -0
- biotite/interface/pymol/cgo.py +346 -0
- biotite/interface/pymol/convert.py +185 -0
- biotite/interface/pymol/display.py +267 -0
- biotite/interface/pymol/object.py +1226 -0
- biotite/interface/pymol/shapes.py +178 -0
- biotite/interface/pymol/startup.py +169 -0
- biotite/interface/rdkit/__init__.py +15 -0
- biotite/interface/rdkit/mol.py +490 -0
- biotite/interface/version.py +71 -0
- biotite/interface/warning.py +19 -0
- biotite/sequence/align/__init__.py +0 -4
- biotite/sequence/align/alignment.py +49 -14
- biotite/sequence/align/banded.cpython-312-darwin.so +0 -0
- biotite/sequence/align/banded.pyx +26 -26
- biotite/sequence/align/cigar.py +2 -2
- biotite/sequence/align/kmeralphabet.cpython-312-darwin.so +0 -0
- biotite/sequence/align/kmeralphabet.pyx +19 -2
- biotite/sequence/align/kmersimilarity.cpython-312-darwin.so +0 -0
- biotite/sequence/align/kmertable.cpython-312-darwin.so +0 -0
- biotite/sequence/align/kmertable.pyx +58 -48
- biotite/sequence/align/localgapped.cpython-312-darwin.so +0 -0
- biotite/sequence/align/localgapped.pyx +47 -47
- biotite/sequence/align/localungapped.cpython-312-darwin.so +0 -0
- biotite/sequence/align/localungapped.pyx +10 -10
- biotite/sequence/align/matrix.py +284 -57
- biotite/sequence/align/matrix_data/3Di.mat +24 -0
- biotite/sequence/align/matrix_data/PB.license +21 -0
- biotite/sequence/align/matrix_data/PB.mat +18 -0
- biotite/sequence/align/multiple.cpython-312-darwin.so +0 -0
- biotite/sequence/align/pairwise.cpython-312-darwin.so +0 -0
- biotite/sequence/align/pairwise.pyx +35 -35
- biotite/sequence/align/permutation.cpython-312-darwin.so +0 -0
- biotite/sequence/align/selector.cpython-312-darwin.so +0 -0
- biotite/sequence/align/selector.pyx +2 -2
- biotite/sequence/align/statistics.py +1 -1
- biotite/sequence/align/tracetable.cpython-312-darwin.so +0 -0
- biotite/sequence/alphabet.py +5 -2
- biotite/sequence/annotation.py +19 -13
- biotite/sequence/codec.cpython-312-darwin.so +0 -0
- biotite/sequence/codon.py +1 -2
- biotite/sequence/graphics/alignment.py +25 -39
- biotite/sequence/graphics/color_schemes/3di_flower.json +48 -0
- biotite/sequence/graphics/color_schemes/pb_flower.json +2 -1
- biotite/sequence/graphics/colorschemes.py +44 -11
- biotite/sequence/graphics/dendrogram.py +4 -2
- biotite/sequence/graphics/features.py +2 -2
- biotite/sequence/graphics/logo.py +10 -12
- biotite/sequence/io/fasta/convert.py +1 -2
- biotite/sequence/io/fasta/file.py +1 -1
- biotite/sequence/io/fastq/file.py +3 -3
- biotite/sequence/io/genbank/file.py +3 -3
- biotite/sequence/io/genbank/sequence.py +2 -0
- biotite/sequence/io/gff/convert.py +1 -1
- biotite/sequence/io/gff/file.py +1 -2
- biotite/sequence/phylo/nj.cpython-312-darwin.so +0 -0
- biotite/sequence/phylo/tree.cpython-312-darwin.so +0 -0
- biotite/sequence/phylo/upgma.cpython-312-darwin.so +0 -0
- biotite/sequence/profile.py +105 -29
- biotite/sequence/search.py +0 -1
- biotite/sequence/seqtypes.py +136 -8
- biotite/sequence/sequence.py +1 -2
- biotite/setup_ccd.py +197 -0
- biotite/structure/__init__.py +6 -3
- biotite/structure/alphabet/__init__.py +25 -0
- biotite/structure/alphabet/encoder.py +332 -0
- biotite/structure/alphabet/encoder_weights_3di.kerasify +0 -0
- biotite/structure/alphabet/i3d.py +109 -0
- biotite/structure/alphabet/layers.py +86 -0
- biotite/structure/alphabet/pb.license +21 -0
- biotite/structure/alphabet/pb.py +170 -0
- biotite/structure/alphabet/unkerasify.py +128 -0
- biotite/structure/atoms.py +163 -66
- biotite/structure/basepairs.py +26 -26
- biotite/structure/bonds.cpython-312-darwin.so +0 -0
- biotite/structure/bonds.pyx +79 -25
- biotite/structure/box.py +19 -21
- biotite/structure/celllist.cpython-312-darwin.so +0 -0
- biotite/structure/celllist.pyx +83 -67
- biotite/structure/chains.py +5 -37
- biotite/structure/charges.cpython-312-darwin.so +0 -0
- biotite/structure/compare.py +420 -13
- biotite/structure/density.py +1 -1
- biotite/structure/dotbracket.py +27 -28
- biotite/structure/filter.py +8 -8
- biotite/structure/geometry.py +74 -127
- biotite/structure/hbond.py +17 -19
- biotite/structure/info/__init__.py +1 -0
- biotite/structure/info/atoms.py +24 -15
- biotite/structure/info/bonds.py +12 -6
- biotite/structure/info/ccd.py +125 -34
- biotite/structure/info/{ccd/components.bcif → components.bcif} +0 -0
- biotite/structure/info/groups.py +62 -19
- biotite/structure/info/masses.py +9 -6
- biotite/structure/info/misc.py +15 -22
- biotite/structure/info/radii.py +92 -22
- biotite/structure/info/standardize.py +4 -4
- biotite/structure/integrity.py +4 -6
- biotite/structure/io/general.py +2 -2
- biotite/structure/io/gro/file.py +8 -9
- biotite/structure/io/mol/convert.py +1 -1
- biotite/structure/io/mol/ctab.py +33 -28
- biotite/structure/io/mol/mol.py +1 -1
- biotite/structure/io/mol/sdf.py +80 -53
- biotite/structure/io/pdb/convert.py +4 -3
- biotite/structure/io/pdb/file.py +85 -25
- biotite/structure/io/pdb/hybrid36.cpython-312-darwin.so +0 -0
- biotite/structure/io/pdbqt/file.py +36 -36
- biotite/structure/io/pdbx/__init__.py +1 -0
- biotite/structure/io/pdbx/bcif.py +54 -15
- biotite/structure/io/pdbx/cif.py +92 -66
- biotite/structure/io/pdbx/component.py +15 -4
- biotite/structure/io/pdbx/compress.py +321 -0
- biotite/structure/io/pdbx/convert.py +410 -75
- biotite/structure/io/pdbx/encoding.cpython-312-darwin.so +0 -0
- biotite/structure/io/pdbx/encoding.pyx +98 -17
- biotite/structure/io/trajfile.py +9 -6
- biotite/structure/io/util.py +38 -0
- biotite/structure/mechanics.py +0 -1
- biotite/structure/molecules.py +141 -156
- biotite/structure/pseudoknots.py +7 -13
- biotite/structure/repair.py +2 -4
- biotite/structure/residues.py +13 -24
- biotite/structure/rings.py +335 -0
- biotite/structure/sasa.cpython-312-darwin.so +0 -0
- biotite/structure/sasa.pyx +2 -1
- biotite/structure/segments.py +69 -11
- biotite/structure/sequence.py +0 -1
- biotite/structure/sse.py +0 -2
- biotite/structure/superimpose.py +74 -62
- biotite/structure/tm.py +581 -0
- biotite/structure/transform.py +12 -25
- biotite/structure/util.py +76 -4
- biotite/version.py +9 -4
- biotite/visualize.py +111 -1
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/METADATA +6 -2
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/RECORD +173 -143
- biotite/structure/info/ccd/README.rst +0 -8
- biotite/structure/info/ccd/amino_acids.txt +0 -1663
- biotite/structure/info/ccd/carbohydrates.txt +0 -1135
- biotite/structure/info/ccd/nucleotides.txt +0 -798
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/WHEEL +0 -0
- {biotite-1.0.1.dist-info → biotite-1.2.0.dist-info}/licenses/LICENSE.rst +0 -0
biotite/structure/util.py
CHANGED
|
@@ -3,14 +3,23 @@
|
|
|
3
3
|
# information.
|
|
4
4
|
|
|
5
5
|
"""
|
|
6
|
-
Utility functions for in internal use in `Bio.Structure` package
|
|
6
|
+
Utility functions for in internal use in `Bio.Structure` package.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
__name__ = "biotite.structure"
|
|
10
10
|
__author__ = "Patrick Kunzmann"
|
|
11
|
-
__all__ = [
|
|
11
|
+
__all__ = [
|
|
12
|
+
"vector_dot",
|
|
13
|
+
"norm_vector",
|
|
14
|
+
"distance",
|
|
15
|
+
"matrix_rotate",
|
|
16
|
+
"coord_for_atom_name_per_residue",
|
|
17
|
+
]
|
|
12
18
|
|
|
13
19
|
import numpy as np
|
|
20
|
+
from biotite.structure.atoms import AtomArrayStack
|
|
21
|
+
from biotite.structure.error import BadStructureError
|
|
22
|
+
from biotite.structure.residues import get_residue_masks, get_residue_starts
|
|
14
23
|
|
|
15
24
|
|
|
16
25
|
def vector_dot(v1, v2):
|
|
@@ -19,7 +28,7 @@ def vector_dot(v1, v2):
|
|
|
19
28
|
|
|
20
29
|
Parameters
|
|
21
30
|
----------
|
|
22
|
-
v1,v2 : ndarray
|
|
31
|
+
v1, v2 : ndarray
|
|
23
32
|
The arrays to calculate the product from.
|
|
24
33
|
The vectors are represented by the last axis.
|
|
25
34
|
|
|
@@ -54,7 +63,7 @@ def distance(v1, v2):
|
|
|
54
63
|
|
|
55
64
|
Parameters
|
|
56
65
|
----------
|
|
57
|
-
v1,v2 : ndarray
|
|
66
|
+
v1, v2 : ndarray
|
|
58
67
|
The arrays to calculate the product from.
|
|
59
68
|
The vectors are represented by the last axis.
|
|
60
69
|
|
|
@@ -94,3 +103,66 @@ def matrix_rotate(v, matrix):
|
|
|
94
103
|
if orig_ndim > 2:
|
|
95
104
|
v = v.reshape(*orig_shape)
|
|
96
105
|
return v
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def coord_for_atom_name_per_residue(atoms, atom_names, mask=None):
|
|
109
|
+
"""
|
|
110
|
+
Get the coordinates of a specific atom for every residue.
|
|
111
|
+
|
|
112
|
+
If a residue does not contain the specified atom, the coordinates are `NaN`.
|
|
113
|
+
If a residue contains multiple atoms with the specified name, an exception is
|
|
114
|
+
raised.
|
|
115
|
+
|
|
116
|
+
Parameters
|
|
117
|
+
----------
|
|
118
|
+
atoms : AtomArray, shape=(n,) or AtomArrayStack, shape=(m,n)
|
|
119
|
+
The atom array or stack to get the residue-wise coordinates from.
|
|
120
|
+
atom_names : list of str, length=k
|
|
121
|
+
The atom names to get the coordinates for.
|
|
122
|
+
mask : ndarray, shape=(n,), dtype=bool, optional
|
|
123
|
+
A boolean mask to further select valid atoms from `atoms`.
|
|
124
|
+
|
|
125
|
+
Returns
|
|
126
|
+
-------
|
|
127
|
+
coord: ndarray, shape=(k, m, r, 3) or shape=(k, r, 3)
|
|
128
|
+
The coordinates of the specified atom for each residue.
|
|
129
|
+
"""
|
|
130
|
+
is_multi_model = isinstance(atoms, AtomArrayStack)
|
|
131
|
+
residue_starts = get_residue_starts(atoms)
|
|
132
|
+
all_residue_masks = get_residue_masks(atoms, residue_starts)
|
|
133
|
+
|
|
134
|
+
if is_multi_model:
|
|
135
|
+
coord = np.full(
|
|
136
|
+
(len(atom_names), atoms.stack_depth(), len(residue_starts), 3),
|
|
137
|
+
np.nan,
|
|
138
|
+
dtype=np.float32,
|
|
139
|
+
)
|
|
140
|
+
else:
|
|
141
|
+
coord = np.full(
|
|
142
|
+
(len(atom_names), len(residue_starts), 3),
|
|
143
|
+
np.nan,
|
|
144
|
+
dtype=np.float32,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
for i, atom_name in enumerate(atom_names):
|
|
148
|
+
specified_atom_mask = atoms.atom_name == atom_name
|
|
149
|
+
if mask is not None:
|
|
150
|
+
specified_atom_mask &= mask
|
|
151
|
+
all_residue_masks_for_specified_atom = all_residue_masks & specified_atom_mask
|
|
152
|
+
number_of_specified_atoms_per_residue = np.count_nonzero(
|
|
153
|
+
all_residue_masks_for_specified_atom, axis=-1
|
|
154
|
+
)
|
|
155
|
+
if np.any(number_of_specified_atoms_per_residue > 1):
|
|
156
|
+
raise BadStructureError(f"Multiple '{atom_name}' atoms per residue")
|
|
157
|
+
residues_with_specified_atom = number_of_specified_atoms_per_residue == 1
|
|
158
|
+
coord_of_specified_atoms = atoms.coord[..., specified_atom_mask, :]
|
|
159
|
+
if is_multi_model:
|
|
160
|
+
# Swap dimensions due to NumPy's behavior when using advanced indexing
|
|
161
|
+
# (https://numpy.org/devdocs/user/basics.indexing.html#combining-advanced-and-basic-indexing)
|
|
162
|
+
coord[i, ..., residues_with_specified_atom, :] = (
|
|
163
|
+
coord_of_specified_atoms.transpose(1, 0, 2)
|
|
164
|
+
)
|
|
165
|
+
else:
|
|
166
|
+
coord[i, residues_with_specified_atom, :] = coord_of_specified_atoms
|
|
167
|
+
|
|
168
|
+
return coord
|
biotite/version.py
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
3
6
|
TYPE_CHECKING = False
|
|
4
7
|
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
12
|
else:
|
|
8
13
|
VERSION_TUPLE = object
|
|
@@ -12,5 +17,5 @@ __version__: str
|
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
|
13
18
|
version_tuple: VERSION_TUPLE
|
|
14
19
|
|
|
15
|
-
__version__ = version = '1.0
|
|
16
|
-
__version_tuple__ = version_tuple = (1,
|
|
20
|
+
__version__ = version = '1.2.0'
|
|
21
|
+
__version_tuple__ = version_tuple = (1, 2, 0)
|
biotite/visualize.py
CHANGED
|
@@ -4,12 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
__name__ = "biotite"
|
|
6
6
|
__author__ = "Patrick Kunzmann"
|
|
7
|
-
__all__ = ["colors", "set_font_size_in_coord", "AdaptiveFancyArrow"]
|
|
7
|
+
__all__ = ["colors", "plot_scaled_text", "set_font_size_in_coord", "AdaptiveFancyArrow"]
|
|
8
8
|
|
|
9
|
+
import warnings
|
|
9
10
|
from collections import OrderedDict
|
|
10
11
|
import numpy as np
|
|
11
12
|
from numpy.linalg import norm
|
|
12
13
|
|
|
14
|
+
_FONT_PROPERTY_KEYS = ["family", "style", "variant", "weight", "stretch", "size"]
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
# Biotite themed colors
|
|
14
18
|
colors = OrderedDict(
|
|
15
19
|
[
|
|
@@ -27,6 +31,105 @@ colors = OrderedDict(
|
|
|
27
31
|
)
|
|
28
32
|
|
|
29
33
|
|
|
34
|
+
def plot_scaled_text(
|
|
35
|
+
axes, text, x, y, width=None, height=None, mode="unlocked", **kwargs
|
|
36
|
+
):
|
|
37
|
+
"""
|
|
38
|
+
Create a :class:`matplotlib.textpath.TextPath`, whose text size is given in
|
|
39
|
+
coordinates instead of font size.
|
|
40
|
+
|
|
41
|
+
Parameters
|
|
42
|
+
----------
|
|
43
|
+
axes : Axes
|
|
44
|
+
The axes to draw the text on.
|
|
45
|
+
text : str
|
|
46
|
+
The text to be drawn.
|
|
47
|
+
x, y : float
|
|
48
|
+
The lower left position of the text.
|
|
49
|
+
width, height : float, optional
|
|
50
|
+
The width/height `text` should have in its reference coordinate system.
|
|
51
|
+
At least one value must be supplied.
|
|
52
|
+
mode : {'proportional', 'unlocked', 'maximum', 'minimum'}, optional
|
|
53
|
+
Defines how the text size is scaled.
|
|
54
|
+
The scaling mode:
|
|
55
|
+
|
|
56
|
+
- *proportional* - The width and height are scaled by the
|
|
57
|
+
same extent.
|
|
58
|
+
Either `width` or `height` must be set for this mode.
|
|
59
|
+
- *unlocked* - The width and the height are scaled by
|
|
60
|
+
different extents, changing the aspect ratio of the text.
|
|
61
|
+
Both `width` and `height` must be set for this mode.
|
|
62
|
+
- *maximum* - The width and the height are scaled by
|
|
63
|
+
the same extent, so that they are at maximum as large
|
|
64
|
+
as the supplied `width`/`height`.
|
|
65
|
+
Both `width` and `height` must be set for this mode.
|
|
66
|
+
- *minimum* - The width and the height are scaled by
|
|
67
|
+
the same extent, so that they are at minimum as large
|
|
68
|
+
as the supplied `width`/`height`.
|
|
69
|
+
Both `width` and `height` must be set for this mode.
|
|
70
|
+
|
|
71
|
+
**kwargs
|
|
72
|
+
Additional parameters for the :class:`matplotlib.font_manager.FontProperties`
|
|
73
|
+
of the text or the created :class:`matplotlib.patches.PathPatch`.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
patch : matplotlib.patches.PathPatch
|
|
78
|
+
The patch that represents the text.
|
|
79
|
+
"""
|
|
80
|
+
from matplotlib.patches import PathPatch
|
|
81
|
+
from matplotlib.textpath import TextPath
|
|
82
|
+
from matplotlib.transforms import Affine2D
|
|
83
|
+
|
|
84
|
+
# The larger the size, the more there is an offset at the x-axis
|
|
85
|
+
# -> Keep font size small to reduce this error to a minimum
|
|
86
|
+
# The size is transformed to the desired size afterwards anyway
|
|
87
|
+
font_property_kwargs = {
|
|
88
|
+
key: kwargs.pop(key) for key in _FONT_PROPERTY_KEYS if key in kwargs
|
|
89
|
+
}
|
|
90
|
+
path = TextPath((x, y), text, size=1e-3, prop=font_property_kwargs)
|
|
91
|
+
bbox = path.get_extents()
|
|
92
|
+
|
|
93
|
+
if mode == "proportional":
|
|
94
|
+
if width is None:
|
|
95
|
+
# Proportional scaling based on height
|
|
96
|
+
scale_y = height / bbox.height
|
|
97
|
+
scale_x = scale_y
|
|
98
|
+
elif height is None:
|
|
99
|
+
# Proportional scaling based on width
|
|
100
|
+
scale_x = width / bbox.width
|
|
101
|
+
scale_y = scale_x
|
|
102
|
+
else:
|
|
103
|
+
raise ValueError(
|
|
104
|
+
"width or height are mutually exclusive in 'proportional' mode"
|
|
105
|
+
)
|
|
106
|
+
elif mode == "unlocked":
|
|
107
|
+
scale_x = width / bbox.width
|
|
108
|
+
scale_y = height / bbox.height
|
|
109
|
+
elif mode == "minimum":
|
|
110
|
+
scale_x = width / bbox.width
|
|
111
|
+
scale_y = height / bbox.height
|
|
112
|
+
scale = max(scale_x, scale_y)
|
|
113
|
+
scale_x, scale_y = scale, scale
|
|
114
|
+
elif mode == "maximum":
|
|
115
|
+
scale_x = width / bbox.width
|
|
116
|
+
scale_y = height / bbox.height
|
|
117
|
+
scale = min(scale_x, scale_y)
|
|
118
|
+
scale_x, scale_y = scale, scale
|
|
119
|
+
|
|
120
|
+
path = (
|
|
121
|
+
Affine2D()
|
|
122
|
+
.translate(-bbox.x0, -bbox.y0)
|
|
123
|
+
.scale(scale_x, scale_y)
|
|
124
|
+
.translate(bbox.x0, bbox.y0)
|
|
125
|
+
.transform_path(path)
|
|
126
|
+
)
|
|
127
|
+
patch = PathPatch(path, **kwargs)
|
|
128
|
+
axes.add_patch(patch)
|
|
129
|
+
|
|
130
|
+
return patch
|
|
131
|
+
|
|
132
|
+
|
|
30
133
|
def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
31
134
|
"""
|
|
32
135
|
Specifiy the font size of an existing `Text` object in coordinates
|
|
@@ -38,6 +141,8 @@ def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
|
38
141
|
The scaling can be proportional or non-proportional, depending
|
|
39
142
|
the `mode`.
|
|
40
143
|
|
|
144
|
+
DEPRECATED: Use :func:`plot_scaled_text()` instead.
|
|
145
|
+
|
|
41
146
|
Parameters
|
|
42
147
|
----------
|
|
43
148
|
text : Text:
|
|
@@ -125,6 +230,11 @@ def set_font_size_in_coord(text, width=None, height=None, mode="unlocked"):
|
|
|
125
230
|
affine = Affine2D().scale(scale_x, scale_y) + affine
|
|
126
231
|
renderer.draw_path(gc, tpath, affine, rgbFace)
|
|
127
232
|
|
|
233
|
+
warnings.warn(
|
|
234
|
+
"Deprecated, use 'biotite.graphics.text.plot_scaled_text()' instead.",
|
|
235
|
+
DeprecationWarning,
|
|
236
|
+
)
|
|
237
|
+
|
|
128
238
|
if mode in ["unlocked", "minimum", "maximum"]:
|
|
129
239
|
if width is None or height is None:
|
|
130
240
|
raise TypeError(f"Width and height must be set in '{mode}' mode")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: biotite
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A comprehensive library for computational molecular biology
|
|
5
5
|
Project-URL: homepage, https://www.biotite-python.org
|
|
6
6
|
Project-URL: repository, https://github.com/biotite-dev/biotite
|
|
@@ -53,7 +53,11 @@ Requires-Dist: biotraj<2.0,>=1.0
|
|
|
53
53
|
Requires-Dist: msgpack>=0.5.6
|
|
54
54
|
Requires-Dist: networkx>=2.0
|
|
55
55
|
Requires-Dist: numpy>=1.25
|
|
56
|
+
Requires-Dist: packaging>=24.0
|
|
56
57
|
Requires-Dist: requests>=2.12
|
|
58
|
+
Provides-Extra: lint
|
|
59
|
+
Requires-Dist: numpydoc==1.8.0; extra == 'lint'
|
|
60
|
+
Requires-Dist: ruff==0.9.7; extra == 'lint'
|
|
57
61
|
Provides-Extra: test
|
|
58
62
|
Requires-Dist: pytest; extra == 'test'
|
|
59
63
|
Requires-Dist: pytest-codspeed; extra == 'test'
|
|
@@ -184,5 +188,5 @@ Contribution
|
|
|
184
188
|
|
|
185
189
|
Interested in improving *Biotite*?
|
|
186
190
|
Have a look at the
|
|
187
|
-
`contribution guidelines <https://www.biotite-python.org/
|
|
191
|
+
`contribution guidelines <https://www.biotite-python.org/latest/contribution/index.html>`_.
|
|
188
192
|
Feel free to join our community chat on `Discord <https://discord.gg/cUjDguF>`_.
|