gwaslab 3.5.5__py3-none-any.whl → 3.5.7__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/__init__.py +2 -1
- gwaslab/g_Sumstats.py +27 -1
- gwaslab/g_SumstatsSet.py +663 -0
- gwaslab/g_version.py +2 -2
- gwaslab/hm_harmonize_sumstats.py +91 -1
- gwaslab/qc_fix_sumstats.py +1 -1
- gwaslab/util_ex_ldproxyfinder.py +162 -3
- gwaslab/util_in_fill_data.py +19 -2
- gwaslab/util_in_filter_value.py +52 -1
- gwaslab/util_in_merge.py +51 -0
- gwaslab/viz_aux_save_figure.py +2 -1
- gwaslab/viz_plot_effect.py +283 -0
- gwaslab/viz_plot_miamiplot2.py +1 -1
- gwaslab/viz_plot_mqqplot.py +103 -65
- gwaslab/viz_plot_regional2.py +136 -44
- gwaslab/viz_plot_rg_heatmap.py +6 -1
- gwaslab/viz_plot_stackedregional.py +17 -6
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/METADATA +3 -3
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/RECORD +23 -20
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/WHEEL +1 -1
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/LICENSE +0 -0
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/LICENSE_before_v3.4.39 +0 -0
- {gwaslab-3.5.5.dist-info → gwaslab-3.5.7.dist-info}/top_level.txt +0 -0
gwaslab/__init__.py
CHANGED
|
@@ -47,4 +47,5 @@ from gwaslab.util_ex_run_susie import _run_susie_rss as run_susie_rss
|
|
|
47
47
|
from gwaslab.io_read_tabular import _read_tabular as read_tabular
|
|
48
48
|
from gwaslab.util_in_meta import meta_analyze
|
|
49
49
|
from gwaslab.viz_plot_scatter_with_reg import scatter
|
|
50
|
-
from gwaslab.util_in_fill_data import rank_based_int
|
|
50
|
+
from gwaslab.util_in_fill_data import rank_based_int
|
|
51
|
+
from gwaslab.g_SumstatsSet import SumstatsSet
|
gwaslab/g_Sumstats.py
CHANGED
|
@@ -30,6 +30,7 @@ from gwaslab.hm_harmonize_sumstats import rsidtochrpos
|
|
|
30
30
|
from gwaslab.hm_harmonize_sumstats import parallelizeassignrsid
|
|
31
31
|
from gwaslab.hm_harmonize_sumstats import parallelinferstrand
|
|
32
32
|
from gwaslab.hm_harmonize_sumstats import parallelrsidtochrpos
|
|
33
|
+
from gwaslab.hm_harmonize_sumstats import _paralleleinferafwithmaf
|
|
33
34
|
from gwaslab.util_in_filter_value import filtervalues
|
|
34
35
|
from gwaslab.util_in_filter_value import filterout
|
|
35
36
|
from gwaslab.util_in_filter_value import filterin
|
|
@@ -39,6 +40,7 @@ from gwaslab.util_in_filter_value import _filter_indel
|
|
|
39
40
|
from gwaslab.util_in_filter_value import _filter_palindromic
|
|
40
41
|
from gwaslab.util_in_filter_value import _filter_snp
|
|
41
42
|
from gwaslab.util_in_filter_value import _exclude_hla
|
|
43
|
+
from gwaslab.util_in_filter_value import _search_variants
|
|
42
44
|
from gwaslab.util_in_filter_value import inferbuild
|
|
43
45
|
from gwaslab.util_in_filter_value import sampling
|
|
44
46
|
from gwaslab.util_in_filter_value import _get_flanking
|
|
@@ -77,6 +79,7 @@ from gwaslab.util_ex_ldsc import _estimate_h2_by_ldsc
|
|
|
77
79
|
from gwaslab.util_ex_ldsc import _estimate_rg_by_ldsc
|
|
78
80
|
from gwaslab.util_ex_ldsc import _estimate_h2_cts_by_ldsc
|
|
79
81
|
from gwaslab.util_ex_ldsc import _estimate_partitioned_h2_by_ldsc
|
|
82
|
+
from gwaslab.util_ex_ldproxyfinder import _extract_ld_proxy
|
|
80
83
|
from gwaslab.bd_get_hapmap3 import gethapmap3
|
|
81
84
|
from gwaslab.util_abf_finemapping import abf_finemapping
|
|
82
85
|
from gwaslab.util_abf_finemapping import make_cs
|
|
@@ -590,6 +593,24 @@ class Sumstats():
|
|
|
590
593
|
else:
|
|
591
594
|
self.data = _exclude_hla(self.data,log=self.log,**kwargs)
|
|
592
595
|
|
|
596
|
+
def search(self, inplace=False, **kwargs):
|
|
597
|
+
if inplace is False:
|
|
598
|
+
new_Sumstats_object = copy.deepcopy(self)
|
|
599
|
+
new_Sumstats_object.data = _search_variants(new_Sumstats_object.data,
|
|
600
|
+
log=new_Sumstats_object.log,
|
|
601
|
+
**kwargs)
|
|
602
|
+
return new_Sumstats_object
|
|
603
|
+
else:
|
|
604
|
+
self.data = _search_variants(self.data,log=self.log,**kwargs)
|
|
605
|
+
|
|
606
|
+
def get_proxy(self,snplist, inplace=False, **kwargs):
|
|
607
|
+
if inplace is False:
|
|
608
|
+
new_Sumstats_object = copy.deepcopy(self)
|
|
609
|
+
new_Sumstats_object.data = _extract_ld_proxy(common_sumstats = new_Sumstats_object.data,
|
|
610
|
+
snplist=snplist,
|
|
611
|
+
log=new_Sumstats_object.log,
|
|
612
|
+
**kwargs)
|
|
613
|
+
return new_Sumstats_object
|
|
593
614
|
|
|
594
615
|
def random_variants(self,inplace=False,n=1,p=None,**kwargs):
|
|
595
616
|
if inplace is True:
|
|
@@ -617,6 +638,11 @@ class Sumstats():
|
|
|
617
638
|
self.data = paralleleinferaf(self.data,ref_infer=ref_infer,log=self.log,**kwargs)
|
|
618
639
|
self.meta["gwaslab"]["references"]["ref_infer_af"] = ref_infer
|
|
619
640
|
self.meta["gwaslab"]["references"]["ref_infer_af"] = _append_meta_record(self.meta["gwaslab"]["references"]["ref_infer_af"] , ref_infer)
|
|
641
|
+
def maf_to_eaf(self,ref_infer,**kwargs):
|
|
642
|
+
self.data = _paralleleinferafwithmaf(self.data,ref_infer=ref_infer,log=self.log,**kwargs)
|
|
643
|
+
self.meta["gwaslab"]["references"]["ref_infer_maf"] = ref_infer
|
|
644
|
+
self.meta["gwaslab"]["references"]["ref_infer_maf"] = _append_meta_record(self.meta["gwaslab"]["references"]["ref_infer_af"] , ref_infer)
|
|
645
|
+
|
|
620
646
|
def plot_daf(self, **kwargs):
|
|
621
647
|
fig,outliers = plotdaf(self.data, **kwargs)
|
|
622
648
|
return fig, outliers
|
|
@@ -805,7 +831,7 @@ class Sumstats():
|
|
|
805
831
|
credible_sets = make_cs(region_data,threshold=0.95,log=self.log)
|
|
806
832
|
return region_data, credible_sets
|
|
807
833
|
|
|
808
|
-
|
|
834
|
+
|
|
809
835
|
## LDSC ##############################################################################################
|
|
810
836
|
def estimate_h2_by_ldsc(self, build=None, verbose=True, match_allele=True, how="right", **kwargs):
|
|
811
837
|
if build is None:
|