genal-python 1.3.2__tar.gz → 1.3.3__tar.gz
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.
- {genal_python-1.3.2 → genal_python-1.3.3}/PKG-INFO +1 -1
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/Geno.py +2 -1
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/__init__.py +1 -1
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/proxy.py +9 -8
- {genal_python-1.3.2 → genal_python-1.3.3}/pyproject.toml +1 -1
- {genal_python-1.3.2 → genal_python-1.3.3}/.DS_Store +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/.gitignore +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/.readthedocs.yaml +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/Genal_flowchart.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/LICENSE +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/README.md +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/.DS_Store +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/Makefile +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.DS_Store +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.buildinfo +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/api.doctree +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/environment.pickle +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/genal.doctree +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/index.doctree +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/introduction.doctree +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/.doctrees/modules.doctree +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/Geno.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/MR.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/MR_tools.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/MRpresso.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/association.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/clump.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/extract_prs.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/geno_tools.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/lift.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/proxy.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/snp_query.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/genal/tools.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_modules/index.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_sources/api.rst.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_sources/genal.rst.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_sources/index.rst.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_sources/introduction.rst.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_sources/modules.rst.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/basic.css +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/badge_only.css +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold-italic.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal-italic.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal.woff +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal.woff2 +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/theme.css +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/doctools.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/documentation_options.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/file.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/js/badge_only.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/js/html5shiv-printshiv.min.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/js/html5shiv.min.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/js/theme.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/language_data.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/minus.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/plus.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/pygments.css +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/searchtools.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/sphinx_highlight.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/api.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/genal.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/genindex.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/index.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/introduction.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/modules.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/objects.inv +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/py-modindex.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/search.html +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/build/searchindex.js +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/make.bat +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/requirements.txt +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/.DS_Store +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/Images/Genal_flowchart.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/Images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/Images/genal_logo.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/api.rst +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/conf.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/index.rst +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/introduction.rst +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/docs/source/modules.rst +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/MR.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/MR_tools.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/MRpresso.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/association.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/clump.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/colocalization.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/constants.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/extract_prs.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/geno_tools.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/lift.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/snp_query.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal/tools.py +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/genal_logo.png +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/gitignore +0 -0
- {genal_python-1.3.2 → genal_python-1.3.3}/readthedocs.yaml +0 -0
|
@@ -4,7 +4,7 @@ from .tools import default_config, write_config, set_plink, install_plink, delet
|
|
|
4
4
|
from .geno_tools import Combine_Geno, filter_by_gene_func
|
|
5
5
|
from .constants import CONFIG_DIR
|
|
6
6
|
|
|
7
|
-
__version__ = "1.3.
|
|
7
|
+
__version__ = "1.3.3"
|
|
8
8
|
|
|
9
9
|
config_path = os.path.join(CONFIG_DIR, "config.json")
|
|
10
10
|
|
|
@@ -196,7 +196,8 @@ def find_proxies(
|
|
|
196
196
|
kb=5000,
|
|
197
197
|
r2=0.8,
|
|
198
198
|
window_snps=1000000,
|
|
199
|
-
threads=1
|
|
199
|
+
threads=1,
|
|
200
|
+
name=None
|
|
200
201
|
):
|
|
201
202
|
"""
|
|
202
203
|
Given a list of SNPs, return a table of proxies using PLINK 2.0.
|
|
@@ -227,13 +228,13 @@ def find_proxies(
|
|
|
227
228
|
extract_arg = ""
|
|
228
229
|
else:
|
|
229
230
|
print("Searching proxies in the provided searchspace.")
|
|
230
|
-
with open("tmp_GENAL/
|
|
231
|
+
with open(f"tmp_GENAL/{name}_searchspace.txt", "w") as file:
|
|
231
232
|
for s in searchspace + snp_list:
|
|
232
233
|
file.write(str(s) + "\n")
|
|
233
|
-
extract_arg = "--extract tmp_GENAL/
|
|
234
|
+
extract_arg = "--extract tmp_GENAL/{name}_searchspace.txt"
|
|
234
235
|
|
|
235
236
|
# Save snp_list to a file
|
|
236
|
-
np.savetxt("tmp_GENAL/
|
|
237
|
+
np.savetxt(f"tmp_GENAL/{name}_snps_to_proxy.txt", snp_list, fmt="%s", delimiter=" ")
|
|
237
238
|
|
|
238
239
|
# Get reference panel path and type
|
|
239
240
|
ref_path, filetype = get_reference_panel_path(reference_panel)
|
|
@@ -256,18 +257,18 @@ def find_proxies(
|
|
|
256
257
|
command = (
|
|
257
258
|
f"{base_cmd} {extract_arg} "
|
|
258
259
|
f"--r-unphased 'cols=chrom,pos,id,maj,nonmaj,freq' "
|
|
259
|
-
f"--ld-snp-list tmp_GENAL/
|
|
260
|
+
f"--ld-snp-list tmp_GENAL/{name}_snps_to_proxy.txt "
|
|
260
261
|
f"--ld-window-kb {kb} "
|
|
261
262
|
f"--ld-window-r2 {r2} "
|
|
262
263
|
f"--ld-window {window_snps} "
|
|
263
264
|
f"--threads {threads} "
|
|
264
|
-
f"--out tmp_GENAL/
|
|
265
|
+
f"--out tmp_GENAL/{name}_proxy.targets"
|
|
265
266
|
)
|
|
266
267
|
|
|
267
268
|
run_plink_command(command)
|
|
268
269
|
|
|
269
270
|
# Read log file to return amount of SNPs to be proxied present in the ref panel
|
|
270
|
-
log_path = os.path.join("tmp_GENAL", "
|
|
271
|
+
log_path = os.path.join("tmp_GENAL", f"{name}_proxy.targets.log")
|
|
271
272
|
log_content = open(log_path).read()
|
|
272
273
|
match = re.search(r'(\d+) variant[s] remaining', log_content)
|
|
273
274
|
if match:
|
|
@@ -280,7 +281,7 @@ def find_proxies(
|
|
|
280
281
|
|
|
281
282
|
# Read and process the output
|
|
282
283
|
try:
|
|
283
|
-
ld = pd.read_csv("tmp_GENAL/
|
|
284
|
+
ld = pd.read_csv(f"tmp_GENAL/{name}_proxy.targets.vcor", sep="\s+")
|
|
284
285
|
except FileNotFoundError:
|
|
285
286
|
print("No proxies found that meet the specified criteria.")
|
|
286
287
|
return None
|
|
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "genal-python" # Updated name for PyPI
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.3"
|
|
8
8
|
authors = [{name = "Cyprien Rivier", email = "riviercyprien@gmail.com"}]
|
|
9
9
|
description = "A python toolkit for polygenic risk scoring and mendelian randomization."
|
|
10
10
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.eot
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.svg
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.ttf
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.woff
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/fontawesome-webfont.woff2
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold-italic.woff
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-bold-italic.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal-italic.woff
RENAMED
|
File without changes
|
{genal_python-1.3.2 → genal_python-1.3.3}/docs/build/_static/css/fonts/lato-normal-italic.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|