genal-python 1.2.3__tar.gz → 1.2.4__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.2.3 → genal_python-1.2.4}/.DS_Store +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/PKG-INFO +1 -1
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/__init__.py +1 -1
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/association.py +11 -5
- {genal_python-1.2.3 → genal_python-1.2.4}/pyproject.toml +1 -1
- {genal_python-1.2.3 → genal_python-1.2.4}/.gitignore +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/.readthedocs.yaml +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/Genal_flowchart.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/LICENSE +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/README.md +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/.DS_Store +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/Makefile +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.DS_Store +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.buildinfo +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/api.doctree +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/environment.pickle +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/genal.doctree +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/index.doctree +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/introduction.doctree +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/.doctrees/modules.doctree +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/Geno.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/MR.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/MR_tools.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/MRpresso.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/association.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/clump.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/extract_prs.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/geno_tools.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/lift.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/proxy.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/snp_query.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/genal/tools.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_modules/index.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_sources/api.rst.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_sources/genal.rst.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_sources/index.rst.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_sources/introduction.rst.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_sources/modules.rst.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/basic.css +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/badge_only.css +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold-italic.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-normal-italic.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-normal.woff +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-normal.woff2 +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/theme.css +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/doctools.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/documentation_options.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/file.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/js/badge_only.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/js/html5shiv-printshiv.min.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/js/html5shiv.min.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/js/theme.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/language_data.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/minus.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/plus.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/pygments.css +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/searchtools.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/sphinx_highlight.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/api.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/genal.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/genindex.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/index.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/introduction.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/modules.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/objects.inv +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/py-modindex.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/search.html +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/build/searchindex.js +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/make.bat +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/requirements.txt +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/.DS_Store +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/Images/Genal_flowchart.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/Images/MR_plot_SBP_AS.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/Images/genal_logo.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/api.rst +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/conf.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/index.rst +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/introduction.rst +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/docs/source/modules.rst +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/Geno.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/MR.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/MR_tools.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/MRpresso.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/clump.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/constants.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/extract_prs.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/geno_tools.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/lift.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/proxy.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/snp_query.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal/tools.py +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/genal_logo.png +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/gitignore +0 -0
- {genal_python-1.2.3 → genal_python-1.2.4}/readthedocs.yaml +0 -0
|
Binary file
|
|
@@ -78,6 +78,7 @@ def _run_plink2_assoc_test(
|
|
|
78
78
|
"--glm",
|
|
79
79
|
*(["allow-no-covars"] if len(covar_list) == 0 else []),
|
|
80
80
|
"no-x-sex",
|
|
81
|
+
"--no-input-missing-phenotype",
|
|
81
82
|
"--pheno-name", "PHENO1"
|
|
82
83
|
]
|
|
83
84
|
|
|
@@ -141,11 +142,13 @@ def _prepare_psam_file(genetic_path, data_pheno, pheno_type, standardize):
|
|
|
141
142
|
# Read the PSAM file
|
|
142
143
|
psam = pd.read_csv(genetic_path + ".psam", delimiter="\t")
|
|
143
144
|
|
|
144
|
-
#
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
# Merge phenotype data with the PSAM dataframe depending on column present
|
|
146
|
+
if "#FID" in psam.columns:
|
|
147
|
+
data_pheno_trait = data_pheno[["FID", "IID", "PHENO"]].rename(columns={"FID": "#FID", "PHENO": "PHENO1"}).copy()
|
|
148
|
+
psam = psam.merge(data_pheno_trait, how="left", on=["#FID", "IID"], indicator=True)
|
|
149
|
+
else:
|
|
150
|
+
data_pheno_trait = data_pheno[["IID", "PHENO"]].rename(columns={"IID": "#IID", "PHENO": "PHENO1"}).copy()
|
|
151
|
+
psam = psam.merge(data_pheno_trait, how="left", on=["#IID"], indicator=True)
|
|
149
152
|
|
|
150
153
|
# Verify that the merge was successful
|
|
151
154
|
if (psam["_merge"] == "both").sum() == 0:
|
|
@@ -173,6 +176,9 @@ def _prepare_psam_file(genetic_path, data_pheno, pheno_type, standardize):
|
|
|
173
176
|
psam["PHENO1"] = (psam["PHENO1"] - psam["PHENO1"].mean(skipna=True)) / psam["PHENO1"].std(skipna=True)
|
|
174
177
|
psam["PHENO1"] = psam["PHENO1"].fillna('NA')
|
|
175
178
|
|
|
179
|
+
# Make sure the SEX column is not empty without modifying existing values
|
|
180
|
+
psam["SEX"] = psam["SEX"].replace('', 'NA').fillna('NA')
|
|
181
|
+
|
|
176
182
|
psam.to_csv(genetic_path + ".psam", sep="\t", index=False)
|
|
177
183
|
return psam
|
|
178
184
|
|
|
@@ -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.2.
|
|
7
|
+
version = "1.2.4"
|
|
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
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Bold.woff2
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/Roboto-Slab-Regular.woff2
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.eot
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.svg
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.ttf
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.woff
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/fontawesome-webfont.woff2
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold-italic.woff
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-bold-italic.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/docs/build/_static/css/fonts/lato-normal-italic.woff
RENAMED
|
File without changes
|
{genal_python-1.2.3 → genal_python-1.2.4}/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
|