pepdata 1.3.9__tar.gz → 1.3.10__tar.gz
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.
- {pepdata-1.3.9/pepdata.egg-info → pepdata-1.3.10}/PKG-INFO +1 -1
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/chou_fasman.py +2 -2
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/alleles.py +1 -1
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/columns.py +1 -1
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/tcell.py +1 -4
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/peptide_vectorizer.py +2 -1
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/version.py +1 -1
- {pepdata-1.3.9 → pepdata-1.3.10/pepdata.egg-info}/PKG-INFO +1 -1
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata.egg-info/SOURCES.txt +1 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pyproject.toml +1 -1
- pepdata-1.3.10/tests/test_chou_fasman.py +36 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/LICENSE.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/MANIFEST.in +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/README.md +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/__init__.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/amino_acid.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/amino_acid_alphabet.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/amino_acid_properties.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/blosum.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/common.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/__init__.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/common.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/iedb/mhc.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/BLOSUM30 +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/BLOSUM50 +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/BLOSUM62 +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/__init__.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/amino_acid_properties.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/helix_vs_coil.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/helix_vs_strand.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/pmbec.mat +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/matrices/strand_vs_coil.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/pairwise_table.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/pmbec.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/reduced_alphabet.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/residue_contact_energies.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata/static_data.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata.egg-info/dependency_links.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata.egg-info/requires.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/pepdata.egg-info/top_level.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/requirements.txt +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/setup.cfg +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_amino_acid_properties.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_amino_acids.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_blosum.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_iedb_alleles.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_iedb_cache_lifecycle.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_iedb_mhc.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_iedb_tcell.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_ngram.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_pairwise_table.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_pmbec.py +0 -0
- {pepdata-1.3.9 → pepdata-1.3.10}/tests/test_public_tables_unchanged.py +0 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# See the License for the specific language governing permissions and
|
|
11
11
|
# limitations under the License.
|
|
12
12
|
|
|
13
|
-
from .amino_acid_alphabet import amino_acid_name_indices
|
|
13
|
+
from .amino_acid_alphabet import amino_acid_name_indices, index_to_letter
|
|
14
14
|
|
|
15
15
|
# Chou-Fasman of structural properties from
|
|
16
16
|
# http://prowl.rockefeller.edu/aainfo/chou.htm
|
|
@@ -55,7 +55,7 @@ def parse_chou_fasman(table):
|
|
|
55
55
|
name = fields[0]
|
|
56
56
|
|
|
57
57
|
assert name in amino_acid_name_indices, "Invalid amino acid name %s" % name
|
|
58
|
-
letter = amino_acid_name_indices[name]
|
|
58
|
+
letter = index_to_letter(amino_acid_name_indices[name])
|
|
59
59
|
alpha = int(fields[1])
|
|
60
60
|
beta = int(fields[2])
|
|
61
61
|
turn = int(fields[3])
|
|
@@ -17,7 +17,7 @@ import xml.etree.ElementTree
|
|
|
17
17
|
from .common import cache
|
|
18
18
|
|
|
19
19
|
ALLELE_XML_FILENAME = "MhcAlleleNames.xml"
|
|
20
|
-
ALLELE_XML_URL = "
|
|
20
|
+
ALLELE_XML_URL = "https://www.iedb.org/doc/MhcAlleleNameList.zip"
|
|
21
21
|
ALLELE_XML_DECOMPRESS = True
|
|
22
22
|
|
|
23
23
|
def local_path(force_download=False):
|
|
@@ -72,7 +72,7 @@ def get_mhc_class(
|
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
def get_mhc_assay(
|
|
75
|
-
df : pd.
|
|
75
|
+
df : pd.DataFrame,
|
|
76
76
|
group_candidates : list[str] = ASSAY_GROUP_CANDIDATES,
|
|
77
77
|
column_candidates : list[str] =["method"]) -> pd.Series | None:
|
|
78
78
|
return find(df, group_candidates, column_candidates)
|
|
@@ -27,13 +27,11 @@ from .columns import (
|
|
|
27
27
|
get_assay_method,
|
|
28
28
|
get_host_name,
|
|
29
29
|
get_mhc_allele,
|
|
30
|
-
get_mhc_class,
|
|
31
30
|
get_epitope_name,
|
|
32
|
-
|
|
33
31
|
)
|
|
34
32
|
|
|
35
33
|
TCELL_COMPACT_FILENAME = "tcell_full.csv"
|
|
36
|
-
TCELL_COMPACT_URL = "
|
|
34
|
+
TCELL_COMPACT_URL = "https://www.iedb.org/downloader.php?file_name=doc/tcell_full_v3.zip"
|
|
37
35
|
TCELL_COMPACT_DECOMPRESS = True
|
|
38
36
|
|
|
39
37
|
def download(force=False):
|
|
@@ -118,7 +116,6 @@ def load_dataframe(
|
|
|
118
116
|
encoding="latin-1")
|
|
119
117
|
|
|
120
118
|
mhc = get_mhc_allele(df)
|
|
121
|
-
mhc_class_series = get_mhc_class(df)
|
|
122
119
|
epitopes = get_epitope_name(df)
|
|
123
120
|
organism = get_host_name(df)
|
|
124
121
|
assay_method_series = get_assay_method(df)
|
|
@@ -23,7 +23,8 @@ def make_count_vectorizer(reduced_alphabet, max_ngram):
|
|
|
23
23
|
if reduced_alphabet is None:
|
|
24
24
|
preprocessor = None
|
|
25
25
|
else:
|
|
26
|
-
preprocessor
|
|
26
|
+
def preprocessor(s):
|
|
27
|
+
return "".join([reduced_alphabet[si] for si in s])
|
|
27
28
|
|
|
28
29
|
return CountVectorizer(
|
|
29
30
|
analyzer='char',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from pepdata.amino_acid_alphabet import canonical_amino_acid_letters
|
|
2
|
+
from pepdata.chou_fasman import (
|
|
3
|
+
alpha_helix_score,
|
|
4
|
+
beta_sheet_score,
|
|
5
|
+
turn_score,
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_chou_fasman_scores_keyed_by_one_letter_codes():
|
|
10
|
+
expected_letters = set(canonical_amino_acid_letters)
|
|
11
|
+
for table in (alpha_helix_score, beta_sheet_score, turn_score):
|
|
12
|
+
assert set(table.keys()) == expected_letters
|
|
13
|
+
assert all(isinstance(k, str) and len(k) == 1 for k in table)
|
|
14
|
+
assert all(isinstance(v, int) for v in table.values())
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_chou_fasman_known_values():
|
|
18
|
+
assert alpha_helix_score["A"] == 142
|
|
19
|
+
assert beta_sheet_score["A"] == 83
|
|
20
|
+
assert turn_score["A"] == 66
|
|
21
|
+
|
|
22
|
+
assert alpha_helix_score["D"] == 101
|
|
23
|
+
assert beta_sheet_score["D"] == 54
|
|
24
|
+
assert turn_score["D"] == 146
|
|
25
|
+
|
|
26
|
+
assert alpha_helix_score["E"] == 151
|
|
27
|
+
assert beta_sheet_score["E"] == 37
|
|
28
|
+
assert turn_score["E"] == 74
|
|
29
|
+
|
|
30
|
+
assert alpha_helix_score["G"] == 57
|
|
31
|
+
assert beta_sheet_score["G"] == 75
|
|
32
|
+
assert turn_score["G"] == 156
|
|
33
|
+
|
|
34
|
+
assert alpha_helix_score["V"] == 106
|
|
35
|
+
assert beta_sheet_score["V"] == 170
|
|
36
|
+
assert turn_score["V"] == 50
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|