python-katlas 0.0.6__tar.gz → 0.0.8__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.
Files changed (23) hide show
  1. {python-katlas-0.0.6/python_katlas.egg-info → python-katlas-0.0.8}/PKG-INFO +1 -1
  2. python-katlas-0.0.8/katlas/__init__.py +1 -0
  3. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/_modidx.py +2 -0
  4. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/core.py +24 -3
  5. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/dl.py +2 -0
  6. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/feature.py +2 -0
  7. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/plot.py +2 -0
  8. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/train.py +2 -0
  9. {python-katlas-0.0.6 → python-katlas-0.0.8/python_katlas.egg-info}/PKG-INFO +1 -1
  10. {python-katlas-0.0.6 → python-katlas-0.0.8}/settings.ini +1 -1
  11. python-katlas-0.0.6/katlas/__init__.py +0 -1
  12. {python-katlas-0.0.6 → python-katlas-0.0.8}/LICENSE +0 -0
  13. {python-katlas-0.0.6 → python-katlas-0.0.8}/MANIFEST.in +0 -0
  14. {python-katlas-0.0.6 → python-katlas-0.0.8}/README.md +0 -0
  15. {python-katlas-0.0.6 → python-katlas-0.0.8}/katlas/imports.py +0 -0
  16. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/SOURCES.txt +0 -0
  17. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/dependency_links.txt +0 -0
  18. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/entry_points.txt +0 -0
  19. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/not-zip-safe +0 -0
  20. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/requires.txt +0 -0
  21. {python-katlas-0.0.6 → python-katlas-0.0.8}/python_katlas.egg-info/top_level.txt +0 -0
  22. {python-katlas-0.0.6 → python-katlas-0.0.8}/setup.cfg +0 -0
  23. {python-katlas-0.0.6 → python-katlas-0.0.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-katlas
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: tools for predicting kinome specificities
5
5
  Home-page: https://github.com/sky1ove/python-katlas
6
6
  Author: lily
@@ -0,0 +1 @@
1
+ __version__ = "0.0.7"
@@ -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'),
@@ -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/combine_site_ochoa_psp.parquet"
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
@@ -1,3 +1,5 @@
1
+ """A collection of deep learning tools via Fastai"""
2
+
1
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/04_DL.ipynb.
2
4
 
3
5
  # %% auto 0
@@ -1,3 +1,5 @@
1
+ """A collection of tools to extract features from SMILES, proteins, etc."""
2
+
1
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_feature.ipynb.
2
4
 
3
5
  # %% auto 0
@@ -1,3 +1,5 @@
1
+ """A collection of plot functions"""
2
+
1
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/02_plot.ipynb.
2
4
 
3
5
  # %% auto 0
@@ -1,3 +1,5 @@
1
+ """A collection of machine learning tools"""
2
+
1
3
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/03_ML.ipynb.
2
4
 
3
5
  # %% auto 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-katlas
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: tools for predicting kinome specificities
5
5
  Home-page: https://github.com/sky1ove/python-katlas
6
6
  Author: lily
@@ -5,7 +5,7 @@
5
5
  ### Python library ###
6
6
  repo = python-katlas
7
7
  lib_name = %(repo)s
8
- version = 0.0.6
8
+ version = 0.0.8
9
9
  min_python = 3.7
10
10
  license = apache2
11
11
  black_formatting = False
@@ -1 +0,0 @@
1
- __version__ = "0.0.3"
File without changes
File without changes
File without changes
File without changes
File without changes