gsMap 1.73.2__py3-none-any.whl → 1.73.3__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 CHANGED
@@ -2,4 +2,4 @@
2
2
  Genetics-informed pathogenic spatial mapping
3
3
  """
4
4
 
5
- __version__ = "1.73.2"
5
+ __version__ = "1.73.3"
gsMap/generate_ldscore.py CHANGED
@@ -57,7 +57,8 @@ def load_gtf(
57
57
  gtf = gtf[gtf["Feature"] == "gene"]
58
58
 
59
59
  # Find common genes between GTF and marker scores
60
- common_gene = np.intersect1d(mk_score.index, gtf.gene_name)
60
+ # common_gene = np.intersect1d(mk_score.index, gtf.gene_name)
61
+ common_gene = list(set(mk_score.index) & set(gtf.gene_name))
61
62
  logger.info(f"Found {len(common_gene)} common genes between GTF and marker scores")
62
63
 
63
64
  # Filter GTF and marker scores to common genes
@@ -69,6 +70,9 @@ def load_gtf(
69
70
 
70
71
  # Process the GTF (open window around gene coordinates)
71
72
  gtf_bed = gtf[["Chromosome", "Start", "End", "gene_name", "Strand"]].copy()
73
+ gtf_bed["Chromosome"] = gtf_bed["Chromosome"].apply(
74
+ lambda x: f"chr{x}" if not str(x).startswith("chr") else x
75
+ )
72
76
  gtf_bed.loc[:, "TSS"] = gtf_bed["Start"]
73
77
  gtf_bed.loc[:, "TED"] = gtf_bed["End"]
74
78
 
@@ -128,7 +132,7 @@ def load_bim(bfile_root: str, chrom: int) -> tuple[pd.DataFrame, pr.PyRanges]:
128
132
  - bim_pr is a PyRanges object with BIM data
129
133
  """
130
134
  bim_file = f"{bfile_root}.{chrom}.bim"
131
- logger.debug(f"Loading BIM file: {bim_file}")
135
+ logger.info(f"Loading BIM file: {bim_file}")
132
136
 
133
137
  bim = pd.read_csv(bim_file, sep="\t", header=None)
134
138
  bim.columns = ["CHR", "SNP", "CM", "BP", "A1", "A2"]
@@ -311,6 +315,8 @@ def get_ldscore(
311
315
  bfile_chr_prefix=f"{bfile_root}.{chrom}", keep_snps=keep_snps_index
312
316
  )
313
317
 
318
+ annot_matrix = annot_matrix[geno_array.kept_snps, :]
319
+
314
320
  # Configure LD window based on specified unit
315
321
  if ld_unit == "SNP":
316
322
  max_dist = ld_wind
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gsMap
3
- Version: 1.73.2
3
+ Version: 1.73.3
4
4
  Summary: Genetics-informed pathogenic spatial mapping
5
5
  Author-email: liyang <songliyang@westlake.edu.cn>, wenhao <chenwenhao@westlake.edu.cn>
6
6
  Requires-Python: >=3.10
@@ -1,4 +1,4 @@
1
- gsMap/__init__.py,sha256=xjO1mrd3lI32sCY5mQ8rHHD4yyTbUr94E758a72nT4c,77
1
+ gsMap/__init__.py,sha256=0XtiYZAbXor3EAyHAebfh1qGJuKOgeB3h1MPE6ukNNY,77
2
2
  gsMap/__main__.py,sha256=Vdhw8YA1K3wPMlbJQYL5WqvRzAKVeZ16mZQFO9VRmCo,62
3
3
  gsMap/cauchy_combination_test.py,sha256=SiUyqJKr4ATFtRgsCEJ43joGcSagCOnnurkB1FlQiB4,5105
4
4
  gsMap/config.py,sha256=LmBVMb0eda6bfrKkQuh7eZnZdvgecjCnozRd_clqvlY,51584
@@ -6,7 +6,7 @@ gsMap/create_slice_mean.py,sha256=Nnmb7ACtS-9TurW5xQ4TqCinejPsYcvuT5Oxqa5Uges,57
6
6
  gsMap/diagnosis.py,sha256=YyT_TkPbb3c22DLpRYu9yynbNGrhytcCgxCoPwz9Bpc,12962
7
7
  gsMap/find_latent_representation.py,sha256=aZ5fFY2RhAsNaDeoehd5lN28556d6GGHK9xEUTvo6G4,5365
8
8
  gsMap/format_sumstats.py,sha256=1c9OgbqDQWOgXeSrbAhbJfChv_2IwXIgLE6Pbw2sx0s,13778
9
- gsMap/generate_ldscore.py,sha256=xxzbaANl638bRvRAowrTPmFA4dEC0zDBv6i8KQTJvJ8,45094
9
+ gsMap/generate_ldscore.py,sha256=G108fVVdGj0Pn50TqFmAXLjQ7OTY9BWnilHoDeIn2D8,45348
10
10
  gsMap/latent_to_gene.py,sha256=sDPvOU4iF-HkfQY0nnkIVXpjyTQ9-PjQflwEFWrPg-A,12869
11
11
  gsMap/main.py,sha256=SzfAXhrlr4LXnSD4gkvAtUUPYXyra6a_MzVCxDBZjr0,1170
12
12
  gsMap/report.py,sha256=_1FYkzGhVGMnvHgEQ8z51iMrVEVlh48a31jLqbV2o9w,6953
@@ -24,8 +24,8 @@ gsMap/utils/generate_r2_matrix.py,sha256=0zyoJDWUVavlQtR6_XXb7Ah9UhPyT3n0t6XCqlI
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=rKA0nkUpTJf6WuGddhKrsBCExchDNEyojOWu_qddZNw,5474
27
- gsmap-1.73.2.dist-info/entry_points.txt,sha256=s_P2Za22O077tc1FPLKMinbdRVXaN_HTcDBgWMYpqA4,41
28
- gsmap-1.73.2.dist-info/licenses/LICENSE,sha256=fb5WP6qQytSKO5rM0ZSqQXg_92Fdt0aAeFNwSi3Lpmc,1069
29
- gsmap-1.73.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
30
- gsmap-1.73.2.dist-info/METADATA,sha256=giDX_EkW5AutmnHHukvC2Kw29fY-q939rA9cWJP5pMY,8196
31
- gsmap-1.73.2.dist-info/RECORD,,
27
+ gsmap-1.73.3.dist-info/entry_points.txt,sha256=s_P2Za22O077tc1FPLKMinbdRVXaN_HTcDBgWMYpqA4,41
28
+ gsmap-1.73.3.dist-info/licenses/LICENSE,sha256=fb5WP6qQytSKO5rM0ZSqQXg_92Fdt0aAeFNwSi3Lpmc,1069
29
+ gsmap-1.73.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
30
+ gsmap-1.73.3.dist-info/METADATA,sha256=-MD9qe4n_qOVF1dAQ6gcSLtCl1DZDMeoRw2EVijGDms,8196
31
+ gsmap-1.73.3.dist-info/RECORD,,
File without changes