gwaslab 3.6.4__py3-none-any.whl → 3.6.6__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_version.py +2 -2
- gwaslab/io_read_pipcs.py +4 -3
- gwaslab/io_to_formats.py +2 -1
- gwaslab/viz_plot_miamiplot2.py +20 -4
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/METADATA +1 -1
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/RECORD +10 -10
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/WHEEL +0 -0
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/licenses/LICENSE +0 -0
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/licenses/LICENSE_before_v3.4.39 +0 -0
- {gwaslab-3.6.4.dist-info → gwaslab-3.6.6.dist-info}/top_level.txt +0 -0
gwaslab/g_version.py
CHANGED
gwaslab/io_read_pipcs.py
CHANGED
|
@@ -11,7 +11,8 @@ def _read_pipcs(data,
|
|
|
11
11
|
group=None,
|
|
12
12
|
studie_names=None,
|
|
13
13
|
log=Log(),
|
|
14
|
-
verbose=True
|
|
14
|
+
verbose=True,
|
|
15
|
+
**readcsv_kwargs):
|
|
15
16
|
|
|
16
17
|
log.write("Start to load PIP and CREDIBLE_SET_INDEX from file...",verbose=verbose)
|
|
17
18
|
log.write(" -File:{}".format(output_prefix),verbose=verbose)
|
|
@@ -32,14 +33,14 @@ def _read_pipcs(data,
|
|
|
32
33
|
pipcs_single_list=[]
|
|
33
34
|
for index,pipcs_path in enumerate(pipcs_path_list):
|
|
34
35
|
log.write(" -Loading {}:".format(pipcs_loci_list[index]) + pipcs_path)
|
|
35
|
-
pipcs_single = pd.read_csv(pipcs_path)
|
|
36
|
+
pipcs_single = pd.read_csv(pipcs_path,**readcsv_kwargs)
|
|
36
37
|
if "LOCUS" not in pipcs_single.columns:
|
|
37
38
|
pipcs_single["LOCUS"]=pipcs_loci_list[index]
|
|
38
39
|
pipcs_single_list.append(pipcs_single)
|
|
39
40
|
|
|
40
41
|
pipcs = pd.concat(pipcs_single_list, axis=0, ignore_index=True)
|
|
41
42
|
else:
|
|
42
|
-
pipcs = pd.read_csv("{}".format(output_prefix))
|
|
43
|
+
pipcs = pd.read_csv("{}".format(output_prefix),**readcsv_kwargs)
|
|
43
44
|
|
|
44
45
|
if "CHR" not in pipcs.columns:
|
|
45
46
|
log.write(" -Merging CHR and POS from main dataframe...",verbose=verbose)
|
gwaslab/io_to_formats.py
CHANGED
|
@@ -402,11 +402,11 @@ def tofmt(sumstats,
|
|
|
402
402
|
|
|
403
403
|
####################################################################################################################
|
|
404
404
|
def _write_tabular(sumstats,rename_dictionary, path, tab_fmt, to_csvargs, to_tabular_kwargs, log, verbose):
|
|
405
|
-
chr_header = rename_dictionary["CHR"]
|
|
406
405
|
if tab_fmt=="tsv" or tab_fmt=="csv":
|
|
407
406
|
try:
|
|
408
407
|
log.write(f" -Fast to csv mode...",verbose=verbose)
|
|
409
408
|
if "@" in path:
|
|
409
|
+
chr_header = rename_dictionary["CHR"]
|
|
410
410
|
log.write(f" -@ detected: writing each chromosome to a single file...",verbose=verbose)
|
|
411
411
|
log.write(" -Chromosomes:{}...".format(list(sumstats["CHR"].unique())),verbose=verbose)
|
|
412
412
|
for single_chr in list(sumstats["CHR"].unique()):
|
|
@@ -420,6 +420,7 @@ def _write_tabular(sumstats,rename_dictionary, path, tab_fmt, to_csvargs, to_tab
|
|
|
420
420
|
except:
|
|
421
421
|
log.write(f"Error in using fast_to_csv. Falling back to original implementation.",verbose=verbose)
|
|
422
422
|
if "@" in path:
|
|
423
|
+
chr_header = rename_dictionary["CHR"]
|
|
423
424
|
log.write(f" -@ detected: writing each chromosome to a single file...",verbose=verbose)
|
|
424
425
|
log.write(" -Chromosomes:{}...".format(list(sumstats["CHR"].unique())),verbose=verbose)
|
|
425
426
|
for single_chr in list(sumstats["CHR"].unique()):
|
gwaslab/viz_plot_miamiplot2.py
CHANGED
|
@@ -102,9 +102,16 @@ def plot_miami2(
|
|
|
102
102
|
cols = ["CHR","POS","P"]
|
|
103
103
|
|
|
104
104
|
if cols1 is None:
|
|
105
|
-
|
|
105
|
+
if scaled1 == True:
|
|
106
|
+
cols1 = ["CHR","POS","MLOG10P"]
|
|
107
|
+
else:
|
|
108
|
+
cols1 = ["CHR","POS","P"]
|
|
109
|
+
|
|
106
110
|
if cols2 is None:
|
|
107
|
-
|
|
111
|
+
if scaled2 == True:
|
|
112
|
+
cols2 = ["CHR","POS","MLOG10P"]
|
|
113
|
+
else:
|
|
114
|
+
cols2 = ["CHR","POS","P"]
|
|
108
115
|
|
|
109
116
|
if id1 is not None:
|
|
110
117
|
cols1.append(id1)
|
|
@@ -206,8 +213,15 @@ def plot_miami2(
|
|
|
206
213
|
sumstats2 = merged_sumstats[cols2].copy()
|
|
207
214
|
|
|
208
215
|
## rename and quick fix ###########################################################################################################
|
|
209
|
-
|
|
210
|
-
|
|
216
|
+
if scaled1==True:
|
|
217
|
+
renaming_dict1 = {cols1[0]:"CHR",cols1[1]:"POS",cols1[2]:"MLOG10P"}
|
|
218
|
+
else:
|
|
219
|
+
renaming_dict1 = {cols1[0]:"CHR",cols1[1]:"POS",cols1[2]:"P"}
|
|
220
|
+
if scaled2==True:
|
|
221
|
+
renaming_dict2 = {cols2[0]:"CHR",cols2[1]:"POS",cols2[2]:"MLOG10P"}
|
|
222
|
+
else:
|
|
223
|
+
renaming_dict2 = {cols2[0]:"CHR",cols2[1]:"POS",cols2[2]:"P"}
|
|
224
|
+
|
|
211
225
|
|
|
212
226
|
sumstats1 = sumstats1.rename(columns=renaming_dict1)
|
|
213
227
|
sumstats1 = _quick_fix(sumstats1,chr_dict=chr_dict1, scaled=scaled1, verbose=verbose, log=log)
|
|
@@ -292,6 +306,7 @@ def plot_miami2(
|
|
|
292
306
|
_chrom_df_for_i = chrom_df,
|
|
293
307
|
_invert=False,
|
|
294
308
|
_if_quick_qc=False,
|
|
309
|
+
font_family=font_family,
|
|
295
310
|
**mqq_args1
|
|
296
311
|
)
|
|
297
312
|
log.write("Finished creating Manhattan plot for sumstats1".format(_get_version()), verbose=verbose)
|
|
@@ -311,6 +326,7 @@ def plot_miami2(
|
|
|
311
326
|
_chrom_df_for_i = chrom_df,
|
|
312
327
|
_invert=True,
|
|
313
328
|
_if_quick_qc=False,
|
|
329
|
+
font_family=font_family,
|
|
314
330
|
**mqq_args2)
|
|
315
331
|
log.write("Finished creating Manhattan plot for sumstats2".format(_get_version()), verbose=verbose)
|
|
316
332
|
|
|
@@ -18,7 +18,7 @@ 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=O0RYviQ98EWaeYDgFXJmxW8qQ8nWSiuXxk7V9Ym8E-s,1964
|
|
22
22
|
gwaslab/hm_casting.py,sha256=xoq1E4Tp5VC4aLWfq9-_AfiQzb1WZAHrnZG33W4sCOE,14178
|
|
23
23
|
gwaslab/hm_casting_polars.py,sha256=CAPfCucj-ARtwP80EuHc9q2gLdj8TL_XQ7_sEC9LxA0,11440
|
|
24
24
|
gwaslab/hm_harmonize_sumstats.py,sha256=2MeWnWmMHpLWjUMTVqExpg_3mE1VIaBsh6Mz3ffJCMc,84761
|
|
@@ -28,9 +28,9 @@ gwaslab/io_preformat_input.py,sha256=jIacIVymCfHVBlonUCFRmUJobLcxMWn2w_vWqXjESPg
|
|
|
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
|
|
31
|
-
gwaslab/io_read_pipcs.py,sha256=
|
|
31
|
+
gwaslab/io_read_pipcs.py,sha256=w0UsP2lyGpYpNosw3LSI2zs54LTgDMizCQlePla4Vsc,2959
|
|
32
32
|
gwaslab/io_read_tabular.py,sha256=EG-C6KhCutt4J4LlOMgXnqzJvU-EZXzVhMvaDFnHrMM,2380
|
|
33
|
-
gwaslab/io_to_formats.py,sha256=
|
|
33
|
+
gwaslab/io_to_formats.py,sha256=PlBarRW4QbDI2HE4RLSb4yA_xBjJapajeBPzQsYk8s8,32865
|
|
34
34
|
gwaslab/io_to_pickle.py,sha256=HhePU0VcaGni0HTNU0BqoRaOnrr0NOxotgY6ISdx3Ck,1833
|
|
35
35
|
gwaslab/ldsc_irwls.py,sha256=83JbAMAhD0KOfpv4IJa6LgUDfQjp4XSJveTjnhCBJYQ,6142
|
|
36
36
|
gwaslab/ldsc_jackknife.py,sha256=XrWHoKS_Xn9StG1I83S2vUMTertsb-GH-_gOFYUhLeU,17715
|
|
@@ -94,7 +94,7 @@ gwaslab/viz_plot_credible_sets.py,sha256=RC5ZsuW8-0w0S1h4c--PZrYwfHfgZ3clM-9JcoM
|
|
|
94
94
|
gwaslab/viz_plot_effect.py,sha256=qbM6c1IB2HlUlMNgFZlJ5G8ODQJ8-oSWD8t0Q8DDuz8,10653
|
|
95
95
|
gwaslab/viz_plot_forestplot.py,sha256=xgOnefh737CgdQxu5naVyRNBX1NQXPFKzf51fbh6afs,6771
|
|
96
96
|
gwaslab/viz_plot_miamiplot.py,sha256=rCFEp7VNuVqeBBG3WRkmFAtFklbF79BvIQQYiSY70VY,31238
|
|
97
|
-
gwaslab/viz_plot_miamiplot2.py,sha256=
|
|
97
|
+
gwaslab/viz_plot_miamiplot2.py,sha256=thukuvia6dGexGcprYVyOt-M5iSCjbpqvMVfRrY6fgk,18015
|
|
98
98
|
gwaslab/viz_plot_mqqplot.py,sha256=W0rKC8I0KrUvv5zakiTcPTEF_ttrUucrwoFS5MHLIyQ,71283
|
|
99
99
|
gwaslab/viz_plot_phe_heatmap.py,sha256=qoXVeFTIm-n8IinNbDdPFVBSz2yGCGK6QzTstXv6aj4,9532
|
|
100
100
|
gwaslab/viz_plot_qqplot.py,sha256=cB4vRlFv69zWY9NMLfSkfAbirYp3_EEW2kQiBTEMDoc,7483
|
|
@@ -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.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
116
|
+
gwaslab-3.6.6.dist-info/licenses/LICENSE_before_v3.4.39,sha256=GhLOU_1UDEKeOacYhsRN_m9u-eIuVTazSndZPeNcTZA,1066
|
|
117
|
+
gwaslab-3.6.6.dist-info/METADATA,sha256=QUXTQeaGhZ9x28IikmoJ5TIkABVj9AxbN4wfqnr9Ogw,7073
|
|
118
|
+
gwaslab-3.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
119
|
+
gwaslab-3.6.6.dist-info/top_level.txt,sha256=PyY6hWtrALpv2MAN3kjkIAzJNmmBTH5a2risz9KwH08,8
|
|
120
|
+
gwaslab-3.6.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|