viper-in-python 2.0.0__tar.gz → 2.0.2__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 (68) hide show
  1. {viper_in_python-2.0.0/viper_in_python.egg-info → viper_in_python-2.0.2}/PKG-INFO +1 -1
  2. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyproject.toml +1 -1
  3. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/__init__.py +1 -1
  4. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_viper.py +10 -10
  5. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/interactome.py +17 -17
  6. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/setup.py +1 -1
  7. {viper_in_python-2.0.0 → viper_in_python-2.0.2/viper_in_python.egg-info}/PKG-INFO +1 -1
  8. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/LICENSE +0 -0
  9. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/MANIFEST.in +0 -0
  10. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/README.md +0 -0
  11. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/NaRnEA.py +0 -0
  12. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_NaRnEA/NaRnEA_classic.py +0 -0
  13. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_NaRnEA/NaRnEA_meta.py +0 -0
  14. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_aREA/aREA_classic.py +0 -0
  15. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_aREA/aREA_meta.py +0 -0
  16. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_aziz_metacell.py +0 -0
  17. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_corr_distance.py +0 -0
  18. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_filtering_funcs.py +0 -0
  19. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_helpers_meta.py +0 -0
  20. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/__init__.py +0 -0
  21. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load.py +0 -0
  22. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load_get_path.py +0 -0
  23. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load_msigdb.py +0 -0
  24. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load_pisces.py +0 -0
  25. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load_regulators.py +0 -0
  26. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_load/_load_translate.py +0 -0
  27. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_metacell_funcs.py +0 -0
  28. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_pl_sns_heatmap.py +0 -0
  29. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_pl_vis_net.py +0 -0
  30. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_pp.py +0 -0
  31. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_rep_subsample_funcs.py +0 -0
  32. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_tl.py +0 -0
  33. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/_translate.py +0 -0
  34. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/aREA.py +0 -0
  35. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/config.py +0 -0
  36. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/cotfs-hugo-mouse.txt +0 -0
  37. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/cotfs-hugo.txt +0 -0
  38. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/sig-hugo-mouse.txt +0 -0
  39. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/sig-hugo.txt +0 -0
  40. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/surf-hugo-mouse.txt +0 -0
  41. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/surf-hugo.txt +0 -0
  42. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/tfs-hugo-mouse.txt +0 -0
  43. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulatorIDs/tfs-hugo.txt +0 -0
  44. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulons/msigdb-c2-as-regulon.parquet.gzip +0 -0
  45. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulons/msigdb-c5-as-regulon.parquet.gzip +0 -0
  46. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulons/msigdb-c6-as-regulon.parquet.gzip +0 -0
  47. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulons/msigdb-c7-as-regulon.parquet.gzip +0 -0
  48. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/regulons/msigdb-h-as-regulon.parquet.gzip +0 -0
  49. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/data/translate/human_mouse_gene_translation.csv +0 -0
  50. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/load.py +0 -0
  51. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pl.py +0 -0
  52. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pleiotropy/__init__.py +0 -0
  53. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pleiotropy/areareg.py +0 -0
  54. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pleiotropy/shadow_regulon_py.py +0 -0
  55. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pleiotropy/table_to_interactome.py +0 -0
  56. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/pp.py +0 -0
  57. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/pyviper/tl.py +0 -0
  58. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/setup.cfg +0 -0
  59. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_interactome.py +0 -0
  60. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_metacells.py +0 -0
  61. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_preprocess.py +0 -0
  62. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_similarity.py +0 -0
  63. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_tools.py +0 -0
  64. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/tests/test_viper.py +0 -0
  65. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/viper_in_python.egg-info/SOURCES.txt +0 -0
  66. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/viper_in_python.egg-info/dependency_links.txt +0 -0
  67. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/viper_in_python.egg-info/requires.txt +0 -0
  68. {viper_in_python-2.0.0 → viper_in_python-2.0.2}/viper_in_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viper-in-python
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A package for VIPER-based Protein Activity analysis of transcriptomic data in Python
5
5
  Home-page: https://github.com/alevax/pyviper
6
6
  Author: Alexander L.E. Wang & Luca Zanella & Zizhao Lin
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "viper-in-python"
7
- version = "2.0.0"
7
+ version = "2.0.2"
8
8
  description = "A package for VIPER-based Protein Activity analysis of transcriptomic data in Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -9,4 +9,4 @@ from pyviper.load import *
9
9
  from pyviper.pl import *
10
10
  from pyviper.tl import *
11
11
 
12
- __version__ = "2.0.0"
12
+ __version__ = "2.0.2"
@@ -71,7 +71,7 @@ def viper( gex_data,
71
71
  store_input_data=True,
72
72
  pleiotropy: bool = False
73
73
  ):
74
-
74
+
75
75
  """
76
76
  The VIPER (Virtual Inference of Protein-activity by Enriched Regulon
77
77
  analysis) algorithm[1] allows individuals to compute protein activity
@@ -84,9 +84,9 @@ def viper( gex_data,
84
84
 
85
85
  The Interactome object must not contain any targets that are not in the
86
86
  features of gex_data. This can be accomplished by running:
87
-
87
+
88
88
  interactome.filter_targets(gex_data.var_names)
89
-
89
+
90
90
  It is highly recommend to do this on the unPruned network and then prune to
91
91
  ensure the pruned network contains a consistent number of targets per
92
92
  regulator, allow of which exist within gex_data.
@@ -161,9 +161,9 @@ def viper( gex_data,
161
161
 
162
162
  References
163
163
  ----------
164
- [1] Alvarez, M. J., et al. (2016). Functional characterization of somatic mutations in
164
+ [1] Alvarez, M. J., et al. (2016). Functional characterization of somatic mutations in
165
165
  cancer using network-based inference of protein activity. Nature Genetics, 48(8), 838–847.
166
- [2] Griffin, A. T., et al. (2023). NaRnEA: An Information Theoretic Framework for Gene Set
166
+ [2] Griffin, A. T., et al. (2023). NaRnEA: An Information Theoretic Framework for Gene Set
167
167
  Analysis. Entropy, 25(3), 542.
168
168
  """
169
169
 
@@ -320,21 +320,21 @@ def viper( gex_data,
320
320
  op.uns['gex_data'] = gex_data
321
321
  # ---- Pleiotropy hook (placeholder) ----
322
322
  if pleiotropy and verbose:
323
- print("[pleiotropy] hook reached")
323
+ print("[pleiotropy] hook reached")
324
324
 
325
325
  # ---- Pleiotropy post-processing (TableToInteractome → ShadowRegulon_py → areareg) ----
326
326
  if pleiotropy:
327
327
 
328
328
  # progress bar (optional)
329
329
  try:
330
- from tqdm import tqdm
330
+ from tqdm import tqdm as tqdm_pleiotropy
331
331
  try:
332
332
  # joblib integration
333
333
  from tqdm.contrib import tqdm_joblib
334
334
  except Exception:
335
335
  tqdm_joblib = None
336
336
  except Exception:
337
- def tqdm(x, **kwargs):
337
+ def tqdm_pleiotropy(x, **kwargs):
338
338
  return x
339
339
  tqdm_joblib = None
340
340
 
@@ -418,7 +418,7 @@ def viper( gex_data,
418
418
  if n_workers > 1:
419
419
  try:
420
420
  if verbose and tqdm_joblib is not None:
421
- with tqdm_joblib(tqdm(total=len(samples), desc="[pleiotropy] samples", unit="sample")):
421
+ with tqdm_joblib(tqdm_pleiotropy(total=len(samples), desc="[pleiotropy] samples", unit="sample")):
422
422
  results = Parallel(n_jobs=n_workers, backend="loky", prefer="processes")(
423
423
  delayed(_run_one)(s) for s in samples
424
424
  )
@@ -434,7 +434,7 @@ def viper( gex_data,
434
434
  if results is None:
435
435
  if verbose:
436
436
  results = []
437
- for s in tqdm(samples, desc="[pleiotropy] samples", unit="sample"):
437
+ for s in tqdm_pleiotropy(samples, desc="[pleiotropy] samples", unit="sample"):
438
438
  results.append(_run_one(s))
439
439
  else:
440
440
  results = [_run_one(s) for s in samples]
@@ -34,7 +34,7 @@ class Interactome:
34
34
  Either:
35
35
  1. A pd.DataFrame containing four columns in this order:
36
36
  "regulator", "target", "mor", "likelihood".
37
- 2. A filepath to this pd.DataFrame stored as .csv, .tsv, .parquet,
37
+ 2. A filepath to this pd.DataFrame stored as .csv, .tsv, .parquet,
38
38
  .parquet.gzip, .pkl, or .loom.
39
39
  3. A filepath to an Interactome object stored as a .pkl.
40
40
  input_type : str, default: None
@@ -44,9 +44,9 @@ class Interactome:
44
44
 
45
45
  References
46
46
  ----------
47
- [1] Alvarez, M. J., Shen, Y., Giorgi, F. M., Lachmann, A., Ding, B. B.,
48
- Ye, B. H., & Califano, A. (2016). Functional characterization of
49
- somatic mutations in cancer using network-based inference of protein
47
+ [1] Alvarez, M. J., Shen, Y., Giorgi, F. M., Lachmann, A., Ding, B. B.,
48
+ Ye, B. H., & Califano, A. (2016). Functional characterization of
49
+ somatic mutations in cancer using network-based inference of protein
50
50
  activity. Nature Genetics, 48(8), 838-847.
51
51
  """
52
52
  def __init__(self, name, net_table=None, input_type=None):
@@ -106,7 +106,7 @@ class Interactome:
106
106
  if n_duplicates > 1:
107
107
  warn(
108
108
  "There are " + str(n_duplicates) + " duplicate regulator" +\
109
- "-target pairs in your Interactome" + interactome.name + "." +\
109
+ "-target pairs in your Interactome" + self.name + "." +\
110
110
  "Use Interactome.remove_duplicate_pairs() to resolve them."
111
111
  )
112
112
 
@@ -255,12 +255,12 @@ class Interactome:
255
255
  def integrate(self, network_list, network_weights = None, normalize_likelihoods = False, verbose=False):
256
256
  """
257
257
  Integrate this Interactome object with one or more other Interactome
258
- objects to create a consensus network. This operation modifies the current
258
+ objects to create a consensus network. This operation modifies the current
259
259
  Interactome in place; no new object is returned. In general, this should be done
260
260
  when interactome objects have the same epigenetics (e.g. due to being
261
261
  made from different datasets of same celltype). MetaVIPER should be used
262
262
  instead when you have multiple interactomes with different epigenetics
263
- (e.g. due to being made of data with different celltypes).
263
+ (e.g. due to being made of data with different celltypes).
264
264
 
265
265
  Parameters
266
266
  ----------
@@ -312,13 +312,13 @@ class Interactome:
312
312
  # adding empty rows of 0s so they be all lined up together in a stack
313
313
  net_array_list = []
314
314
 
315
- loop = (tqdm(range(0, n_networks), 'Standardizing network')
315
+ loop = (tqdm(range(0, n_networks), 'Standardizing network')
316
316
  if verbose else range(0, n_networks))
317
317
  for i in loop:
318
318
  # Get the missing pairs from a single dataframe
319
319
  net_df = network_list[i]
320
320
  pairs_in_single_df = net_df[reg_targ]
321
-
321
+
322
322
  ## Convert the columns to sets for faster set operations
323
323
  # all_pairs_set = set(map(tuple, all_pairs_df[['regulator', 'target']].values)) # We can just use all_pairs_df which was already computed
324
324
  # single_pairs_set = set(map(tuple, pairs_in_single_df[['regulator', 'target']].values)) # We can just use drop_duplicates() again
@@ -326,12 +326,12 @@ class Interactome:
326
326
  # missing_pairs_set = all_pairs_set - single_pairs_set
327
327
  ## Convert the missing pairs back to a DataFrame
328
328
  # missing_pairs_df = pd.DataFrame(list(missing_pairs_set), columns=['regulator', 'target'])
329
-
329
+
330
330
  # Using pd.merge avoids expensive set conversion operations
331
331
  single_pairs_set = pairs_in_single_df[reg_targ].drop_duplicates()
332
332
  mrg = all_pairs_df.merge(single_pairs_set, how='left', on=reg_targ, indicator=True)
333
333
  missing_pairs_df = mrg[mrg['_merge'] == 'left_only'][reg_targ]
334
-
334
+
335
335
  # Check if regulators in missing_pairs_df are in net_df["regulator"]
336
336
  in_net_df = missing_pairs_df['regulator'].isin(net_df['regulator'])
337
337
  # Create two DataFrames based on the condition
@@ -743,12 +743,12 @@ class Interactome:
743
743
  """
744
744
  Translate the regulators of the Interactome. The current name format of
745
745
  the regulators should be one of the following:
746
-
747
- - mouse_symbol
748
- - mouse_ensembl
749
- - mouse_entrez
750
- - human_symbol
751
- - human_ensembl
746
+
747
+ - mouse_symbol
748
+ - mouse_ensembl
749
+ - mouse_entrez
750
+ - human_symbol
751
+ - human_ensembl
752
752
  - human_entrez
753
753
 
754
754
  Parameters
@@ -11,7 +11,7 @@ long_description = (this_directory / "README.md").read_text()
11
11
 
12
12
  setuptools.setup(
13
13
  name="viper-in-python",
14
- version="2.0.0",
14
+ version="2.0.2",
15
15
  author="Alexander L.E. Wang & Luca Zanella & Zizhao Lin",
16
16
  author_email="aw3436@cumc.columbia.edu",
17
17
  packages=setuptools.find_packages(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: viper-in-python
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A package for VIPER-based Protein Activity analysis of transcriptomic data in Python
5
5
  Home-page: https://github.com/alevax/pyviper
6
6
  Author: Alexander L.E. Wang & Luca Zanella & Zizhao Lin
File without changes