python-katlas 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.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.
- katlas/__init__.py +1 -1
- katlas/_modidx.py +2 -0
- katlas/core.py +24 -3
- katlas/dl.py +2 -0
- katlas/feature.py +2 -0
- katlas/plot.py +2 -0
- katlas/train.py +2 -0
- {python_katlas-0.0.6.dist-info → python_katlas-0.0.8.dist-info}/METADATA +1 -1
- python_katlas-0.0.8.dist-info/RECORD +14 -0
- python_katlas-0.0.6.dist-info/RECORD +0 -14
- {python_katlas-0.0.6.dist-info → python_katlas-0.0.8.dist-info}/LICENSE +0 -0
- {python_katlas-0.0.6.dist-info → python_katlas-0.0.8.dist-info}/WHEEL +0 -0
- {python_katlas-0.0.6.dist-info → python_katlas-0.0.8.dist-info}/entry_points.txt +0 -0
- {python_katlas-0.0.6.dist-info → python_katlas-0.0.8.dist-info}/top_level.txt +0 -0
katlas/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.7"
|
katlas/_modidx.py
CHANGED
|
@@ -19,6 +19,8 @@ d = { 'settings': { 'branch': 'main',
|
|
|
19
19
|
'katlas.core.Data.get_cddm_others_info': ('core.html#data.get_cddm_others_info', 'katlas/core.py'),
|
|
20
20
|
'katlas.core.Data.get_cddm_upper': ('core.html#data.get_cddm_upper', 'katlas/core.py'),
|
|
21
21
|
'katlas.core.Data.get_combine': ('core.html#data.get_combine', 'katlas/core.py'),
|
|
22
|
+
'katlas.core.Data.get_combine_site_phosphorylated': ( 'core.html#data.get_combine_site_phosphorylated',
|
|
23
|
+
'katlas/core.py'),
|
|
22
24
|
'katlas.core.Data.get_combine_site_psp_ochoa': ('core.html#data.get_combine_site_psp_ochoa', 'katlas/core.py'),
|
|
23
25
|
'katlas.core.Data.get_cptac_ensembl_site': ('core.html#data.get_cptac_ensembl_site', 'katlas/core.py'),
|
|
24
26
|
'katlas.core.Data.get_cptac_gene_site': ('core.html#data.get_cptac_gene_site', 'katlas/core.py'),
|
katlas/core.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"""Core functions in Katlas library"""
|
|
2
|
+
|
|
1
3
|
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.
|
|
2
4
|
|
|
3
5
|
# %% auto 0
|
|
@@ -177,7 +179,7 @@ class Data:
|
|
|
177
179
|
return Data.fetch_data(Data.OCHOA_URL)
|
|
178
180
|
|
|
179
181
|
# combine ochoa and PSP low throughput data
|
|
180
|
-
COMBINE_PSP_OCHOA_URL = "https://github.com/sky1ove/katlas/raw/main/dataset/phosphosites/
|
|
182
|
+
COMBINE_PSP_OCHOA_URL = "https://github.com/sky1ove/katlas/raw/main/dataset/phosphosites/combine_site_psp_ochoa.parquet"
|
|
181
183
|
@staticmethod
|
|
182
184
|
def get_combine_site_psp_ochoa():
|
|
183
185
|
"Combined Ochoa and PhosphoSitePlus"
|
|
@@ -187,6 +189,17 @@ class Data:
|
|
|
187
189
|
df.columns = [int(col) if col.lstrip('-').isdigit() else col for col in df.columns]
|
|
188
190
|
return df
|
|
189
191
|
|
|
192
|
+
# combine ochoa and PSP low throughput data
|
|
193
|
+
P_COMBINE_PSP_OCHOA_URL = "https://github.com/sky1ove/katlas/raw/main/dataset/phosphosites/phosphorylated_combine_site.parquet"
|
|
194
|
+
@staticmethod
|
|
195
|
+
def get_combine_site_phosphorylated():
|
|
196
|
+
"Combined Ochoa and PhosphoSitePlus with phosphorylation status"
|
|
197
|
+
df = Data.fetch_data(Data.P_COMBINE_PSP_OCHOA_URL)
|
|
198
|
+
|
|
199
|
+
#Convert the number in the column name into integer
|
|
200
|
+
df.columns = [int(col) if col.lstrip('-').isdigit() else col for col in df.columns]
|
|
201
|
+
return df
|
|
202
|
+
|
|
190
203
|
|
|
191
204
|
# %% ../nbs/00_core.ipynb 12
|
|
192
205
|
class CPTAC:
|
|
@@ -395,6 +408,7 @@ def predict_kinase(input_string: str, # site sequence
|
|
|
395
408
|
ref: pd.DataFrame, # reference dataframe for scoring
|
|
396
409
|
func: Callable, # function to calculate score
|
|
397
410
|
to_lower: bool=False, # convert capital STY to lower case
|
|
411
|
+
to_upper: bool=False, # convert all letter to uppercase
|
|
398
412
|
verbose=True
|
|
399
413
|
):
|
|
400
414
|
"Predict kinase given a phosphorylation site sequence"
|
|
@@ -408,6 +422,10 @@ def predict_kinase(input_string: str, # site sequence
|
|
|
408
422
|
# If to_lower is True, convert STY in the sequence to lower case
|
|
409
423
|
if to_lower:
|
|
410
424
|
input_string = STY2sty(input_string)
|
|
425
|
+
|
|
426
|
+
# If to_upper is True, convert the sequence to all uppercase
|
|
427
|
+
if to_upper:
|
|
428
|
+
input_string = input_string.upper()
|
|
411
429
|
|
|
412
430
|
results = [] # Initialize a list to store the scores for each kinase
|
|
413
431
|
|
|
@@ -446,10 +464,10 @@ param_PSPA = {'ref':Data.get_pspa_all_norm(), 'func':multiply().func}
|
|
|
446
464
|
|
|
447
465
|
# Kinase-substrate dataset, CDDM
|
|
448
466
|
param_CDDM = {'ref':Data.get_cddm(), 'func':sumup}
|
|
449
|
-
param_CDDM_upper = {'ref':Data.get_cddm_upper(), 'func':sumup} # specific for all uppercase
|
|
467
|
+
param_CDDM_upper = {'ref':Data.get_cddm_upper(), 'func':sumup, 'to_upper':True} # specific for all uppercase
|
|
450
468
|
|
|
451
469
|
# %% ../nbs/00_core.ipynb 46
|
|
452
|
-
def predict_kinase_df(df, seq_col, ref, func, to_lower=False):
|
|
470
|
+
def predict_kinase_df(df, seq_col, ref, func, to_lower=False, to_upper=False):
|
|
453
471
|
print('input dataframe has a length', df.shape[0])
|
|
454
472
|
print('Preprocessing')
|
|
455
473
|
|
|
@@ -466,6 +484,9 @@ def predict_kinase_df(df, seq_col, ref, func, to_lower=False):
|
|
|
466
484
|
if to_lower:
|
|
467
485
|
df[seq_col] = df[seq_col].apply(STY2sty)
|
|
468
486
|
|
|
487
|
+
if to_upper:
|
|
488
|
+
df[seq_col] = df[seq_col].str.upper()
|
|
489
|
+
|
|
469
490
|
# Adjust sequence lengths to match the reference matrix's expected inputs
|
|
470
491
|
max_value = ref.columns.str[:-1].astype(int).max() # Get the highest position index from the reference columns
|
|
471
492
|
min_value = ref.columns.str[:-1].astype(int).min() # Get the lowest position index
|
katlas/dl.py
CHANGED
katlas/feature.py
CHANGED
katlas/plot.py
CHANGED
katlas/train.py
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
katlas/__init__.py,sha256=R9xOYoYrWKcfO5zvTeGC3m_eDNOvxMd8CocQs2tLufo,22
|
|
2
|
+
katlas/_modidx.py,sha256=W8FiqZd2da7DE4nVJaoG56fLD8I1fkmfyXQwHqOFYZg,11245
|
|
3
|
+
katlas/core.py,sha256=8jPQS49qIitfbfyQOCljcql8K05aTCWKHjMCXcdcwWs,35871
|
|
4
|
+
katlas/dl.py,sha256=gV-rwTLU9IudwFyNJKo-MP8nmOzhqURZQt3rJalHoG8,10903
|
|
5
|
+
katlas/feature.py,sha256=Wv94R0hnAovErifV2x5ky8uvRMNSGPjnS4ivyWVoZps,11548
|
|
6
|
+
katlas/imports.py,sha256=-ZphRU8K1KspxMpgRxisE0OskrCw3S8JR8tvmeXBRY0,147
|
|
7
|
+
katlas/plot.py,sha256=_bzvMwxzAjXg0Zxb5Sv7bfCIopxJegjCA-DutjrLybo,23668
|
|
8
|
+
katlas/train.py,sha256=OhiR2ev1UhPBBSWLncwfNjy_UImSmB_kVhZp7DyCQ50,7671
|
|
9
|
+
python_katlas-0.0.8.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
10
|
+
python_katlas-0.0.8.dist-info/METADATA,sha256=86tumS-YaIzTRrU7Tu7xcA0WlYbsdn1zhCAUC9Ba7OE,15482
|
|
11
|
+
python_katlas-0.0.8.dist-info/WHEEL,sha256=EVRjI69F5qVjm_YgqcTXPnTAv3BfSUr0WVAHuSP3Xoo,92
|
|
12
|
+
python_katlas-0.0.8.dist-info/entry_points.txt,sha256=SF3xDlCmE84ECTBIMDo_FNg1aXGX2-lXkCvH5o4VgpM,34
|
|
13
|
+
python_katlas-0.0.8.dist-info/top_level.txt,sha256=pKBKw9KOSJgnnFkoilkDij_iJ_tJbIO4XnrSXIleqNc,7
|
|
14
|
+
python_katlas-0.0.8.dist-info/RECORD,,
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
katlas/__init__.py,sha256=4GZKi13lDTD25YBkGakhZyEQZWTER_OWQMNPoH_UM2c,22
|
|
2
|
-
katlas/_modidx.py,sha256=COjpHUccTtv9jU9ifJgAn1uHwwYCpwyyFpM_ifl42Ew,11010
|
|
3
|
-
katlas/core.py,sha256=sJLUQJugXKjN6B71esnYDmB3GcdX8YcFxvfIm1EdrAM,34959
|
|
4
|
-
katlas/dl.py,sha256=Rm1EO6oGTiHpqp4EA2xAvbIUnh608FPYOdzndRGKVkc,10849
|
|
5
|
-
katlas/feature.py,sha256=3zgTuCnXqH1e0LGZ2Hkvan852PiaIHxj27cg_TJfKzo,11471
|
|
6
|
-
katlas/imports.py,sha256=-ZphRU8K1KspxMpgRxisE0OskrCw3S8JR8tvmeXBRY0,147
|
|
7
|
-
katlas/plot.py,sha256=vB3gv0aaCNERW1CtdDWqM4jIZOx1auGWwi_1I22xBa0,23630
|
|
8
|
-
katlas/train.py,sha256=s0ucsZVaixCTZPz-XAI2J7zQDeGkiYEJKOc2dFTYsAc,7625
|
|
9
|
-
python_katlas-0.0.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
10
|
-
python_katlas-0.0.6.dist-info/METADATA,sha256=Q6mxI66o2dpBZMo_VV3m2jUrYCUunUJMk3elyR4CW7o,15482
|
|
11
|
-
python_katlas-0.0.6.dist-info/WHEEL,sha256=EVRjI69F5qVjm_YgqcTXPnTAv3BfSUr0WVAHuSP3Xoo,92
|
|
12
|
-
python_katlas-0.0.6.dist-info/entry_points.txt,sha256=SF3xDlCmE84ECTBIMDo_FNg1aXGX2-lXkCvH5o4VgpM,34
|
|
13
|
-
python_katlas-0.0.6.dist-info/top_level.txt,sha256=pKBKw9KOSJgnnFkoilkDij_iJ_tJbIO4XnrSXIleqNc,7
|
|
14
|
-
python_katlas-0.0.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|