gwaslab 3.6.2__py3-none-any.whl → 3.6.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.
Potentially problematic release.
This version of gwaslab might be problematic. Click here for more details.
- gwaslab/g_Sumstats.py +1 -1
- gwaslab/g_version.py +4 -2
- gwaslab/io_load_ld.py +3 -1
- gwaslab/io_preformat_input.py +5 -3
- gwaslab/util_ex_run_clumping.py +8 -4
- gwaslab/util_ex_run_scdrs.py +1 -1
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/METADATA +1 -1
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/RECORD +12 -12
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/WHEEL +1 -1
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/licenses/LICENSE +0 -0
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/licenses/LICENSE_before_v3.4.39 +0 -0
- {gwaslab-3.6.2.dist-info → gwaslab-3.6.3.dist-info}/top_level.txt +0 -0
gwaslab/g_Sumstats.py
CHANGED
gwaslab/g_version.py
CHANGED
|
@@ -2,11 +2,13 @@ from gwaslab.g_Log import Log
|
|
|
2
2
|
import subprocess
|
|
3
3
|
import os
|
|
4
4
|
import numpy as np
|
|
5
|
+
import sys
|
|
5
6
|
|
|
6
7
|
def _show_version(log=Log(), verbose=True):
|
|
7
8
|
# show version when loading sumstats
|
|
8
9
|
log.write("GWASLab v{} https://cloufield.github.io/gwaslab/".format(gwaslab_info()["version"]),verbose=verbose)
|
|
9
10
|
log.write("(C) 2022-2025, Yunye He, Kamatani Lab, GPL-3.0 license, gwaslab@gmail.com",verbose=verbose)
|
|
11
|
+
log.write(f"Python version: {sys.version}",verbose=verbose)
|
|
10
12
|
|
|
11
13
|
def _get_version():
|
|
12
14
|
# return short version string like v3.4.33
|
|
@@ -15,8 +17,8 @@ def _get_version():
|
|
|
15
17
|
def gwaslab_info():
|
|
16
18
|
# version meta information
|
|
17
19
|
dic={
|
|
18
|
-
"version":"3.6.
|
|
19
|
-
"release_date":"
|
|
20
|
+
"version":"3.6.3",
|
|
21
|
+
"release_date":"202505"
|
|
20
22
|
}
|
|
21
23
|
return dic
|
|
22
24
|
|
gwaslab/io_load_ld.py
CHANGED
|
@@ -233,7 +233,9 @@ def process_ld(sumstats,
|
|
|
233
233
|
lead_snpid = matched_snpid.group(0).split(":")[1:]
|
|
234
234
|
lead_snpid[0]= int(lead_snpid[0])
|
|
235
235
|
lead_series = pd.Series(lead_snpid)
|
|
236
|
-
|
|
236
|
+
|
|
237
|
+
print(sumstats)
|
|
238
|
+
print(sumstats.loc[lead_id, "REFINDEX"])
|
|
237
239
|
# if lead pos is available:
|
|
238
240
|
if sumstats.loc[lead_id, "REFINDEX"] is not None:
|
|
239
241
|
lead_snp_ref_index = sumstats.loc[lead_id, "REFINDEX"]
|
gwaslab/io_preformat_input.py
CHANGED
|
@@ -58,7 +58,7 @@ def preformat(sumstats,
|
|
|
58
58
|
study=None,
|
|
59
59
|
trait=None,
|
|
60
60
|
build=None,
|
|
61
|
-
other=
|
|
61
|
+
other=None,
|
|
62
62
|
usekeys=None,
|
|
63
63
|
chrom_pat=None,
|
|
64
64
|
snpid_pat=None,
|
|
@@ -68,8 +68,10 @@ def preformat(sumstats,
|
|
|
68
68
|
|
|
69
69
|
#renaming dictionary
|
|
70
70
|
rename_dictionary = {}
|
|
71
|
-
usecols =
|
|
72
|
-
|
|
71
|
+
usecols = list()
|
|
72
|
+
if other is None:
|
|
73
|
+
other = list()
|
|
74
|
+
dtype_dictionary = {}
|
|
73
75
|
if readargs is None:
|
|
74
76
|
readargs={}
|
|
75
77
|
#######################################################################################################################################################
|
gwaslab/util_ex_run_clumping.py
CHANGED
|
@@ -9,7 +9,7 @@ from gwaslab.util_ex_process_ref import _process_plink_input_files
|
|
|
9
9
|
from gwaslab.g_version import _checking_plink_version
|
|
10
10
|
|
|
11
11
|
def _clump(insumstats, vcf=None, scaled=False, out="clumping_plink2",
|
|
12
|
-
p="P",mlog10p="MLOG10P", overwrite=False, study=None, bfile=None,
|
|
12
|
+
p="P",mlog10p="MLOG10P", overwrite=False, study=None, bfile=None, pfile=None,
|
|
13
13
|
n_cores=1, memory=None, chrom=None, clump_p1=5e-8, clump_p2=5e-8, clump_r2=0.01, clump_kb=250,
|
|
14
14
|
log=Log(),verbose=True,plink="plink",plink2="plink2"):
|
|
15
15
|
##start function with col checking##########################################################
|
|
@@ -54,6 +54,7 @@ def _clump(insumstats, vcf=None, scaled=False, out="clumping_plink2",
|
|
|
54
54
|
# process reference file
|
|
55
55
|
bfile, plink_log, ref_bim,filetype = _process_plink_input_files(chrlist=sumstats["CHR"].unique(),
|
|
56
56
|
bfile=bfile,
|
|
57
|
+
pfile=pfile,
|
|
57
58
|
vcf=vcf,
|
|
58
59
|
n_cores=n_cores,
|
|
59
60
|
plink_log=plink_log,
|
|
@@ -162,9 +163,12 @@ def _clump(insumstats, vcf=None, scaled=False, out="clumping_plink2",
|
|
|
162
163
|
log.write(e.output)
|
|
163
164
|
#os.system(script)
|
|
164
165
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
try:
|
|
167
|
+
clumped = pd.read_csv("{}.clumps".format(out_single_chr),sep="\s+")
|
|
168
|
+
results = pd.concat([results,clumped],ignore_index=True)
|
|
169
|
+
|
|
170
|
+
except:
|
|
171
|
+
log.write(f"Clumping failed for chr{i}")
|
|
168
172
|
# remove temp SNPIDP file
|
|
169
173
|
os.remove(clump)
|
|
170
174
|
|
gwaslab/util_ex_run_scdrs.py
CHANGED
|
@@ -84,7 +84,7 @@ def _run_scdrs( scdrs="scdrs",
|
|
|
84
84
|
bash_script+=f'''
|
|
85
85
|
{python} {scdrs} perform-downstream {analysis_string} \
|
|
86
86
|
--h5ad-file {h5ad_file} \
|
|
87
|
-
--score-file {trait}.full_score.gz \
|
|
87
|
+
--score-file ./{trait}.full_score.gz \
|
|
88
88
|
--out-folder {out_folder} \
|
|
89
89
|
--min_genes 250 \
|
|
90
90
|
--min_cells 50 \
|
|
@@ -6,7 +6,7 @@ gwaslab/bd_get_hapmap3.py,sha256=qWTvIRZsd7F3nT9sN2NSXUsxZJRf5k4HLgJ6kN0qaUc,410
|
|
|
6
6
|
gwaslab/cache_manager.py,sha256=HOTnSkCOyGEPLRl90WT8D_6pAdI8d8AzenMIDGuCeWc,28113
|
|
7
7
|
gwaslab/g_Log.py,sha256=C3Zv-_6c3C9ms8bgQ-ytplz22sjk7euqXYkWr9zNeAs,1573
|
|
8
8
|
gwaslab/g_Phenotypes.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
gwaslab/g_Sumstats.py,sha256=
|
|
9
|
+
gwaslab/g_Sumstats.py,sha256=VowMdFIwYfGABbhrpMRd3OV8HPRwWjYWTU4p6TAn4Q4,43781
|
|
10
10
|
gwaslab/g_SumstatsMulti.py,sha256=2y8brnKAs5I9tUexQJiFwOsFLC4MyACn7IybvvXsRDU,13828
|
|
11
11
|
gwaslab/g_SumstatsPair.py,sha256=PmVPGU32degDuU5RDG9igyT1sFAbEDh6alrRulUphyk,13181
|
|
12
12
|
gwaslab/g_SumstatsSet.py,sha256=AiTISWPfmu8NTGa8j9Yuts8DNw1pEUENYyPoS0HXp5I,29866
|
|
@@ -18,13 +18,13 @@ gwaslab/g_meta.py,sha256=pXtSsQfFPv2UJmOxKMmLtcsp_Ku_H73YP7PnlfMd0sg,6472
|
|
|
18
18
|
gwaslab/g_meta_update.py,sha256=dWgz4kcq9bvsXycCjfhoYtcJHlEP4HRdYoQ8KFqMyTQ,2490
|
|
19
19
|
gwaslab/g_vchange_status.py,sha256=w3zsYYOcCaI3PTeboonvkQjudzUAfVIgATzRdiPViZs,1939
|
|
20
20
|
gwaslab/g_vchange_status_polars.py,sha256=kxyGQCur0ibVFBCyZghA-XNf_kLDXKK-l7VC-Om2IdA,1839
|
|
21
|
-
gwaslab/g_version.py,sha256=
|
|
21
|
+
gwaslab/g_version.py,sha256=Jop2Odt1nWgJsn3Dghjc76Mmetuwqm1xAqeFva3yVgk,1962
|
|
22
22
|
gwaslab/hm_casting.py,sha256=xoq1E4Tp5VC4aLWfq9-_AfiQzb1WZAHrnZG33W4sCOE,14178
|
|
23
23
|
gwaslab/hm_casting_polars.py,sha256=_3ZeMg3mRsa7vHpxObFErOledpaydhC_PxStcwlYO2c,8371
|
|
24
24
|
gwaslab/hm_harmonize_sumstats.py,sha256=2MeWnWmMHpLWjUMTVqExpg_3mE1VIaBsh6Mz3ffJCMc,84761
|
|
25
25
|
gwaslab/hm_rsid_to_chrpos.py,sha256=ODWREO0jPN0RAfNzL5fRzSRANfhiksOvUVPuEsFZQqA,6552
|
|
26
|
-
gwaslab/io_load_ld.py,sha256=
|
|
27
|
-
gwaslab/io_preformat_input.py,sha256=
|
|
26
|
+
gwaslab/io_load_ld.py,sha256=P4v-6WO3boamvc3i_iAfwZlo-z4JwBez81S5CkxpoS4,21916
|
|
27
|
+
gwaslab/io_preformat_input.py,sha256=3C33kvtPpVfaidWWBDx6Z4Nu60Wj4L80SX80xD_beUY,25713
|
|
28
28
|
gwaslab/io_preformat_input_polars.py,sha256=HGdi6rXPQnYjTW8fMUds-uF6Lt8uElL3Er_Afv3OjTc,24767
|
|
29
29
|
gwaslab/io_process_args.py,sha256=TIv0DyaVEcHnLBGdOD52GBZiO6nAQJycAmmVdEYPmRE,1918
|
|
30
30
|
gwaslab/io_read_ldsc.py,sha256=9tV4AfQZmCAyiNSR9uALmXWOytWhBdT0pfMAY5Mx_QQ,13407
|
|
@@ -60,14 +60,14 @@ gwaslab/util_ex_process_h5.py,sha256=ynFvo3zxgvOxWYL565v2IQf8P6iEuq7UlKQ_ULxrd6Y
|
|
|
60
60
|
gwaslab/util_ex_process_ref.py,sha256=GQ0ZEWLxGpHLdBs3tqnAqKn3Pqx1A1YvNbYrBLBvXeg,17126
|
|
61
61
|
gwaslab/util_ex_run_2samplemr.py,sha256=eIw-bHlYpgqgRnAhWIWNTbMplVbH4Dbj9kDyDBtzkT0,10423
|
|
62
62
|
gwaslab/util_ex_run_ccgwas.py,sha256=8uOAaJ44zAhlxj_A2vth5AzRLk2_BYlYBXEccFbB6T0,5959
|
|
63
|
-
gwaslab/util_ex_run_clumping.py,sha256=
|
|
63
|
+
gwaslab/util_ex_run_clumping.py,sha256=7JdHP2XmJS1b0yJObxXDKvEXuZ6wezHvvUMFEzVcswY,8081
|
|
64
64
|
gwaslab/util_ex_run_coloc.py,sha256=evLJ_ct_RV7UKLnYGJ_VfT6MeuGeYDtj8M8xqqk-X-U,6297
|
|
65
65
|
gwaslab/util_ex_run_hyprcoloc.py,sha256=sElGLXsBKx3PpDTOET7ulvjBShtDOJ3OyDuOp3Yl_y0,4722
|
|
66
66
|
gwaslab/util_ex_run_magma.py,sha256=40Mr9IIkUXTHa3bBfROORr-5iVre-W8SeoZhHjh7aTo,2436
|
|
67
67
|
gwaslab/util_ex_run_mesusie.py,sha256=g0x7-zwoN9fbHYJQAue3vAMIeFu3x8H9KjgiYI1u9Mk,5532
|
|
68
68
|
gwaslab/util_ex_run_mtag.py,sha256=TxfDwjbGy5C1SiTVDMNopcSjl9p5mgCjJVBfeLq__bg,2952
|
|
69
69
|
gwaslab/util_ex_run_prscs.py,sha256=_BOUqX3fgALdGx-xDyWlREXCafZZddhcK8ufoESUaac,3396
|
|
70
|
-
gwaslab/util_ex_run_scdrs.py,sha256=
|
|
70
|
+
gwaslab/util_ex_run_scdrs.py,sha256=cs1-6QMB2uixa7j97vN7xe3NQ8aQwZ1QAmfj_cc-Kec,3024
|
|
71
71
|
gwaslab/util_ex_run_susie.py,sha256=YbHishvu7rT83JSHw_Tb_FKzfkZ296YpvNhBesveYR4,6332
|
|
72
72
|
gwaslab/util_in_calculate_gc.py,sha256=MWOXVzJv7SZx4i2_ncRiqsiEOADc7EfghaUzgGy4jaE,2219
|
|
73
73
|
gwaslab/util_in_calculate_power.py,sha256=JfHJFg3tNF0f4NHgWlzVW2mSxCiP07mAHIyEfVfxTak,10360
|
|
@@ -112,9 +112,9 @@ gwaslab/data/hapmap3_SNPs/hapmap3_db150_hg19.snplist.gz,sha256=qD9RsC5S2h6l-OdpW
|
|
|
112
112
|
gwaslab/data/hapmap3_SNPs/hapmap3_db151_hg38.snplist.gz,sha256=Y8ZT2FIAhbhlgCJdE9qQVAiwnV_fcsPt72usBa7RSBM,10225828
|
|
113
113
|
gwaslab/data/high_ld/high_ld_hla_hg19.bed.gz,sha256=R7IkssKu0L4WwkU9SrS84xCMdrkkKL0gnTNO_OKbG0Y,219
|
|
114
114
|
gwaslab/data/high_ld/high_ld_hla_hg38.bed.gz,sha256=76CIU0pibDJ72Y6UY-TbIKE9gEPwTELAaIbCXyjm80Q,470
|
|
115
|
-
gwaslab-3.6.
|
|
116
|
-
gwaslab-3.6.
|
|
117
|
-
gwaslab-3.6.
|
|
118
|
-
gwaslab-3.6.
|
|
119
|
-
gwaslab-3.6.
|
|
120
|
-
gwaslab-3.6.
|
|
115
|
+
gwaslab-3.6.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
116
|
+
gwaslab-3.6.3.dist-info/licenses/LICENSE_before_v3.4.39,sha256=GhLOU_1UDEKeOacYhsRN_m9u-eIuVTazSndZPeNcTZA,1066
|
|
117
|
+
gwaslab-3.6.3.dist-info/METADATA,sha256=tIgPWN8dJTS-x4WFwAhEMN3Ex-XJRqdTZYFd8qM7u3w,7043
|
|
118
|
+
gwaslab-3.6.3.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
119
|
+
gwaslab-3.6.3.dist-info/top_level.txt,sha256=PyY6hWtrALpv2MAN3kjkIAzJNmmBTH5a2risz9KwH08,8
|
|
120
|
+
gwaslab-3.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|