gsMap 1.73.4__py3-none-any.whl → 1.73.5__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.
- gsMap/__init__.py +2 -2
- gsMap/utils/generate_r2_matrix.py +12 -14
- {gsmap-1.73.4.dist-info → gsmap-1.73.5.dist-info}/METADATA +2 -2
- {gsmap-1.73.4.dist-info → gsmap-1.73.5.dist-info}/RECORD +7 -7
- {gsmap-1.73.4.dist-info → gsmap-1.73.5.dist-info}/WHEEL +0 -0
- {gsmap-1.73.4.dist-info → gsmap-1.73.5.dist-info}/entry_points.txt +0 -0
- {gsmap-1.73.4.dist-info → gsmap-1.73.5.dist-info}/licenses/LICENSE +0 -0
gsMap/__init__.py
CHANGED
@@ -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(
|
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.
|
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
|
-
|
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
|
-
|
296
|
-
maf_mask =
|
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
|
-
|
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,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: gsMap
|
3
|
-
Version: 1.73.
|
4
|
-
Summary:
|
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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
gsMap/__init__.py,sha256=
|
1
|
+
gsMap/__init__.py,sha256=ra0VGxzGpetF2e7p415XeprzKQVQSon_5Gv_DnlbYHU,97
|
2
2
|
gsMap/__main__.py,sha256=Vdhw8YA1K3wPMlbJQYL5WqvRzAKVeZ16mZQFO9VRmCo,62
|
3
3
|
gsMap/cauchy_combination_test.py,sha256=SiUyqJKr4ATFtRgsCEJ43joGcSagCOnnurkB1FlQiB4,5105
|
4
4
|
gsMap/config.py,sha256=xQQJKqe-ZLohxzEZ0L_CEXXbbUK-U6-H6BnISteqrHs,51316
|
@@ -20,12 +20,12 @@ gsMap/GNN/model.py,sha256=75In9sxBkaqqpCQSrQEUO-zsQQVQnkXVbKsAgyAZjiQ,2918
|
|
20
20
|
gsMap/GNN/train.py,sha256=4qipaxaz3rQOtlRpTYCfl1Oz4kz_A6vNB1aw8_gGK_k,3076
|
21
21
|
gsMap/templates/report_template.html,sha256=QODZEbVxpW1xsLz7lDrD_DyUfzYoi9E17o2tLJlf8OQ,8016
|
22
22
|
gsMap/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
-
gsMap/utils/generate_r2_matrix.py,sha256=
|
23
|
+
gsMap/utils/generate_r2_matrix.py,sha256=5LX99x7k404NyV52CmegdZi9Pm9nh5X2JElisdN2PU0,19915
|
24
24
|
gsMap/utils/jackknife.py,sha256=w_qMj9GlqViouHuOw1U80N6doWuCTXuPoAVU4P-5mm8,17673
|
25
25
|
gsMap/utils/manhattan_plot.py,sha256=4ok5CHAaT_MadyMPnFZMR_llmE8Vf4-KiEfametgHq0,25480
|
26
26
|
gsMap/utils/regression_read.py,sha256=uBSKlvYVhUKmDSCBvKHQrE1wLNyvK-rbzc5TJV51oDI,5649
|
27
|
-
gsmap-1.73.
|
28
|
-
gsmap-1.73.
|
29
|
-
gsmap-1.73.
|
30
|
-
gsmap-1.73.
|
31
|
-
gsmap-1.73.
|
27
|
+
gsmap-1.73.5.dist-info/entry_points.txt,sha256=s_P2Za22O077tc1FPLKMinbdRVXaN_HTcDBgWMYpqA4,41
|
28
|
+
gsmap-1.73.5.dist-info/licenses/LICENSE,sha256=fb5WP6qQytSKO5rM0ZSqQXg_92Fdt0aAeFNwSi3Lpmc,1069
|
29
|
+
gsmap-1.73.5.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
30
|
+
gsmap-1.73.5.dist-info/METADATA,sha256=9a7ejINVfz1GXHCAm959bnjFYJcQDmS9upYe1ISIkHU,8216
|
31
|
+
gsmap-1.73.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|