gsMap 1.73.4__tar.gz → 1.73.5__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 (80) hide show
  1. {gsmap-1.73.4 → gsmap-1.73.5}/.pre-commit-config.yaml +1 -1
  2. {gsmap-1.73.4 → gsmap-1.73.5}/PKG-INFO +2 -2
  3. gsmap-1.73.5/src/gsMap/__init__.py +5 -0
  4. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/utils/generate_r2_matrix.py +12 -14
  5. gsmap-1.73.4/src/gsMap/__init__.py +0 -5
  6. {gsmap-1.73.4 → gsmap-1.73.5}/.coveragerc +0 -0
  7. {gsmap-1.73.4 → gsmap-1.73.5}/.github/workflows/docs.yml +0 -0
  8. {gsmap-1.73.4 → gsmap-1.73.5}/.github/workflows/publish-to-pypi.yml +0 -0
  9. {gsmap-1.73.4 → gsmap-1.73.5}/.github/workflows/test_linux.yml +0 -0
  10. {gsmap-1.73.4 → gsmap-1.73.5}/.gitignore +0 -0
  11. {gsmap-1.73.4 → gsmap-1.73.5}/.markdownlint.yaml +0 -0
  12. {gsmap-1.73.4 → gsmap-1.73.5}/LICENSE +0 -0
  13. {gsmap-1.73.4 → gsmap-1.73.5}/README.md +0 -0
  14. {gsmap-1.73.4 → gsmap-1.73.5}/codecov.yml +0 -0
  15. {gsmap-1.73.4 → gsmap-1.73.5}/docs/Makefile +0 -0
  16. {gsmap-1.73.4 → gsmap-1.73.5}/docs/make.bat +0 -0
  17. {gsmap-1.73.4 → gsmap-1.73.5}/docs/requirements.txt +0 -0
  18. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/10x.md +0 -0
  19. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/_static/schematic.svg +0 -0
  20. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/advanced_usage.md +0 -0
  21. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/cauchy_combination.rst +0 -0
  22. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/create_slice_mean.rst +0 -0
  23. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/find_latent_representations.rst +0 -0
  24. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/format_sumstats.rst +0 -0
  25. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/generate_ldscore.rst +0 -0
  26. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/latent_to_gene.rst +0 -0
  27. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/quick_mode.rst +0 -0
  28. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/report.rst +0 -0
  29. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api/spatial_ldsc.rst +0 -0
  30. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/api.rst +0 -0
  31. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/conf.py +0 -0
  32. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/data.rst +0 -0
  33. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/data_format.md +0 -0
  34. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/index.rst +0 -0
  35. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/install.rst +0 -0
  36. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/quick_mode.md +0 -0
  37. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/release.rst +0 -0
  38. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/step_by_step.md +0 -0
  39. {gsmap-1.73.4 → gsmap-1.73.5}/docs/source/tutorials.rst +0 -0
  40. {gsmap-1.73.4 → gsmap-1.73.5}/pyproject.toml +0 -0
  41. {gsmap-1.73.4 → gsmap-1.73.5}/schematic.png +0 -0
  42. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/GNN/__init__.py +0 -0
  43. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/GNN/adjacency_matrix.py +0 -0
  44. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/GNN/model.py +0 -0
  45. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/GNN/train.py +0 -0
  46. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/__main__.py +0 -0
  47. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/cauchy_combination_test.py +0 -0
  48. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/config.py +0 -0
  49. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/create_slice_mean.py +0 -0
  50. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/diagnosis.py +0 -0
  51. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/find_latent_representation.py +0 -0
  52. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/format_sumstats.py +0 -0
  53. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/generate_ldscore.py +0 -0
  54. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/latent_to_gene.py +0 -0
  55. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/main.py +0 -0
  56. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/report.py +0 -0
  57. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/run_all_mode.py +0 -0
  58. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/setup.py +0 -0
  59. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/spatial_ldsc_multiple_sumstats.py +0 -0
  60. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/templates/report_template.html +0 -0
  61. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/utils/__init__.py +0 -0
  62. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/utils/jackknife.py +0 -0
  63. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/utils/manhattan_plot.py +0 -0
  64. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/utils/regression_read.py +0 -0
  65. {gsmap-1.73.4 → gsmap-1.73.5}/src/gsMap/visualize.py +0 -0
  66. {gsmap-1.73.4 → gsmap-1.73.5}/tests/conftest.py +0 -0
  67. {gsmap-1.73.4 → gsmap-1.73.5}/tests/test_advanced_usage.py +0 -0
  68. {gsmap-1.73.4 → gsmap-1.73.5}/tests/test_cli.py +0 -0
  69. {gsmap-1.73.4 → gsmap-1.73.5}/tests/test_docs_cli_parsing.py +0 -0
  70. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/Makefile +0 -0
  71. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/make.bat +0 -0
  72. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/requirements.txt +0 -0
  73. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/raw1_add_txt.svg +0 -0
  74. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/raw2_add_txt.svg +0 -0
  75. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/raw3_add_txt.svg +0 -0
  76. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/raw4_add_txt.svg +0 -0
  77. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/raw5_add_txt.svg +0 -0
  78. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/_static/schematic.svg +0 -0
  79. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/conf.py +0 -0
  80. {gsmap-1.73.4 → gsmap-1.73.5}/visualization_web_docs/source/index.rst +0 -0
@@ -38,7 +38,7 @@ repos:
38
38
  )$
39
39
 
40
40
  - repo: https://github.com/astral-sh/ruff-pre-commit
41
- rev: v0.11.7
41
+ rev: v0.11.8
42
42
  hooks:
43
43
  - id: ruff
44
44
  args: [--fix, --exit-non-zero-on-fix]
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gsMap
3
- Version: 1.73.4
4
- Summary: Genetics-informed pathogenic spatial mapping
3
+ Version: 1.73.5
4
+ Summary: Genetically informed spatial mapping of cells for complex traits
5
5
  Author-email: liyang <songliyang@westlake.edu.cn>, wenhao <chenwenhao@westlake.edu.cn>
6
6
  Requires-Python: >=3.10
7
7
  Description-Content-Type: text/markdown
@@ -0,0 +1,5 @@
1
+ """
2
+ Genetically informed spatial mapping of cells for complex traits
3
+ """
4
+
5
+ __version__ = "1.73.5"
@@ -94,26 +94,26 @@ class PlinkBEDFile:
94
94
  # Filter out invalid SNPs
95
95
  valid_mask = self.all_snp_info["valid_snp"]
96
96
  if num_invalid := np.sum(~valid_mask):
97
- logger.warning(f"Filtering out {num_invalid} bad quality SNPs")
97
+ logger.warning(
98
+ f"Filtering out {num_invalid} bad quality SNPs: {self.bim_df.loc[~valid_mask, 'SNP'].tolist()}"
99
+ )
98
100
  else:
99
101
  logger.info("All SNPs passed the basic quality check")
100
102
 
101
- # Only keep valid SNPs
102
- self.kept_snps = np.arange(self.m_original)[valid_mask]
103
-
104
- # Update bim_df to only include valid SNPs and reset index
105
- self.bim_df = self.bim_df.loc[valid_mask].reset_index(drop=True)
106
-
107
103
  # Create new genotype data with only the valid SNPs
108
104
  new_geno = ba.bitarray()
109
- for j in self.kept_snps:
105
+ for j in np.arange(self.m_original)[valid_mask]:
110
106
  new_geno += self.geno_original[
111
107
  2 * self.nru_original * j : 2 * self.nru_original * (j + 1)
112
108
  ]
113
109
 
114
110
  # Update original data to only include valid SNPs
115
111
  self.geno_original = new_geno
116
- self.m_original = len(self.kept_snps)
112
+
113
+ # Only keep valid SNPs
114
+ self.bim_df = self.bim_df.loc[valid_mask].reset_index(drop=True)
115
+ self.m_original = len(self.bim_df)
116
+ self.kept_snps = np.arange(self.m_original)
117
117
 
118
118
  # Initialize current state variables
119
119
  self._currentSNP = 0
@@ -292,8 +292,8 @@ class PlinkBEDFile:
292
292
 
293
293
  # Apply MAF filter using pre-calculated values
294
294
  if mafMin is not None and mafMin > 0:
295
- maf_values = np.minimum(self.all_snp_info["freq"], 1 - self.all_snp_info["freq"])
296
- maf_mask = (maf_values > mafMin) & self.all_snp_info["valid_snp"]
295
+ # Remove the redundant valid_snp check since all SNPs are already valid
296
+ maf_mask = self.maf > mafMin
297
297
  kept_snps = kept_snps[maf_mask]
298
298
  logger.info(f"After MAF filtering (>{mafMin}), {len(kept_snps)} SNPs remain")
299
299
 
@@ -369,9 +369,7 @@ class PlinkBEDFile:
369
369
  list
370
370
  List of SNP IDs that pass the MAF threshold
371
371
  """
372
- # Use the pre-calculated MAF values
373
- maf_values = np.minimum(self.all_snp_info["freq"], 1 - self.all_snp_info["freq"])
374
- maf_mask = (maf_values > mafMin) & self.all_snp_info["valid_snp"]
372
+ maf_mask = self.maf > mafMin
375
373
 
376
374
  # Get SNP names from the BIM dataframe
377
375
  snp_pass_maf = self.bim_df.loc[maf_mask, "SNP"].tolist()
@@ -1,5 +0,0 @@
1
- """
2
- Genetics-informed pathogenic spatial mapping
3
- """
4
-
5
- __version__ = "1.73.4"
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