python-katlas 0.0.5__py3-none-any.whl → 0.0.7__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.3"
1
+ __version__ = "0.0.6"
katlas/core.py CHANGED
@@ -395,6 +395,7 @@ def predict_kinase(input_string: str, # site sequence
395
395
  ref: pd.DataFrame, # reference dataframe for scoring
396
396
  func: Callable, # function to calculate score
397
397
  to_lower: bool=False, # convert capital STY to lower case
398
+ to_upper: bool=False, # convert all letter to uppercase
398
399
  verbose=True
399
400
  ):
400
401
  "Predict kinase given a phosphorylation site sequence"
@@ -408,6 +409,10 @@ def predict_kinase(input_string: str, # site sequence
408
409
  # If to_lower is True, convert STY in the sequence to lower case
409
410
  if to_lower:
410
411
  input_string = STY2sty(input_string)
412
+
413
+ # If to_upper is True, convert the sequence to all uppercase
414
+ if to_upper:
415
+ input_string = input_string.upper()
411
416
 
412
417
  results = [] # Initialize a list to store the scores for each kinase
413
418
 
@@ -446,10 +451,10 @@ param_PSPA = {'ref':Data.get_pspa_all_norm(), 'func':multiply().func}
446
451
 
447
452
  # Kinase-substrate dataset, CDDM
448
453
  param_CDDM = {'ref':Data.get_cddm(), 'func':sumup}
449
- param_CDDM_upper = {'ref':Data.get_cddm_upper(), 'func':sumup} # specific for all uppercase
454
+ param_CDDM_upper = {'ref':Data.get_cddm_upper(), 'func':sumup, 'to_upper':True} # specific for all uppercase
450
455
 
451
456
  # %% ../nbs/00_core.ipynb 46
452
- def predict_kinase_df(df, seq_col, ref, func, to_lower=False):
457
+ def predict_kinase_df(df, seq_col, ref, func, to_lower=False, to_upper=False):
453
458
  print('input dataframe has a length', df.shape[0])
454
459
  print('Preprocessing')
455
460
 
@@ -466,6 +471,9 @@ def predict_kinase_df(df, seq_col, ref, func, to_lower=False):
466
471
  if to_lower:
467
472
  df[seq_col] = df[seq_col].apply(STY2sty)
468
473
 
474
+ if to_upper:
475
+ df[seq_col] = df[seq_col].str.upper()
476
+
469
477
  # Adjust sequence lengths to match the reference matrix's expected inputs
470
478
  max_value = ref.columns.str[:-1].astype(int).max() # Get the highest position index from the reference columns
471
479
  min_value = ref.columns.str[:-1].astype(int).min() # Get the lowest position index
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-katlas
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: tools for predicting kinome specificities
5
5
  Home-page: https://github.com/sky1ove/python-katlas
6
6
  Author: lily
@@ -21,6 +21,7 @@ License-File: LICENSE
21
21
  Requires-Dist: statsmodels
22
22
  Requires-Dist: fastparquet
23
23
  Requires-Dist: tqdm
24
+ Requires-Dist: joblib
24
25
  Provides-Extra: dev
25
26
  Requires-Dist: nbdev ; extra == 'dev'
26
27
  Requires-Dist: pyngrok ; extra == 'dev'
@@ -1,14 +1,14 @@
1
- katlas/__init__.py,sha256=4GZKi13lDTD25YBkGakhZyEQZWTER_OWQMNPoH_UM2c,22
1
+ katlas/__init__.py,sha256=QiiYsv0kcJaB8wCWyT-FnI2b6be87HA-CrrIUn8LQhg,22
2
2
  katlas/_modidx.py,sha256=COjpHUccTtv9jU9ifJgAn1uHwwYCpwyyFpM_ifl42Ew,11010
3
- katlas/core.py,sha256=sJLUQJugXKjN6B71esnYDmB3GcdX8YcFxvfIm1EdrAM,34959
3
+ katlas/core.py,sha256=a4dYSYUSLsixcXmLVJwso3iwHUjlN4XJZ4Vbnr4_I98,35274
4
4
  katlas/dl.py,sha256=Rm1EO6oGTiHpqp4EA2xAvbIUnh608FPYOdzndRGKVkc,10849
5
5
  katlas/feature.py,sha256=3zgTuCnXqH1e0LGZ2Hkvan852PiaIHxj27cg_TJfKzo,11471
6
6
  katlas/imports.py,sha256=-ZphRU8K1KspxMpgRxisE0OskrCw3S8JR8tvmeXBRY0,147
7
7
  katlas/plot.py,sha256=vB3gv0aaCNERW1CtdDWqM4jIZOx1auGWwi_1I22xBa0,23630
8
8
  katlas/train.py,sha256=s0ucsZVaixCTZPz-XAI2J7zQDeGkiYEJKOc2dFTYsAc,7625
9
- python_katlas-0.0.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
10
- python_katlas-0.0.5.dist-info/METADATA,sha256=rmglXwVjYgVHCpK5wyq8mrRFyv2iyS8ESMD8L3GqEDY,15460
11
- python_katlas-0.0.5.dist-info/WHEEL,sha256=EVRjI69F5qVjm_YgqcTXPnTAv3BfSUr0WVAHuSP3Xoo,92
12
- python_katlas-0.0.5.dist-info/entry_points.txt,sha256=SF3xDlCmE84ECTBIMDo_FNg1aXGX2-lXkCvH5o4VgpM,34
13
- python_katlas-0.0.5.dist-info/top_level.txt,sha256=pKBKw9KOSJgnnFkoilkDij_iJ_tJbIO4XnrSXIleqNc,7
14
- python_katlas-0.0.5.dist-info/RECORD,,
9
+ python_katlas-0.0.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
10
+ python_katlas-0.0.7.dist-info/METADATA,sha256=azPEmysqMFYpCJlC4gDDA1Yyprb5914xceAysBb7G5Q,15482
11
+ python_katlas-0.0.7.dist-info/WHEEL,sha256=EVRjI69F5qVjm_YgqcTXPnTAv3BfSUr0WVAHuSP3Xoo,92
12
+ python_katlas-0.0.7.dist-info/entry_points.txt,sha256=SF3xDlCmE84ECTBIMDo_FNg1aXGX2-lXkCvH5o4VgpM,34
13
+ python_katlas-0.0.7.dist-info/top_level.txt,sha256=pKBKw9KOSJgnnFkoilkDij_iJ_tJbIO4XnrSXIleqNc,7
14
+ python_katlas-0.0.7.dist-info/RECORD,,