From 3a03bac4a2bb27ad68c14e62ff4d53aa1a87309a Mon Sep 17 00:00:00 2001 From: hjulienn <hanna.julienne@pasteur.fr> Date: Mon, 4 Jan 2021 13:32:22 +0100 Subject: [PATCH] fix filer on imputation quality --- doc/source/index.rst | 6 +++--- jass_preprocessing/map_gwas.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index cae2a93..85f30e7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -97,11 +97,11 @@ Input Note that the combination of Consortium and outcome must be unique because it will be used as an index in the cleaning process. Here is an example of descriptor field, the field irrelevant (for example odd ratio for continuous trait) for the study must be filled with na. - +Some fields are optional like the imputation_quality. If not used they can be filled with na. .. csv-table:: GWAS information table! - :header: "filename","consortia","outcome","fullName","type","Nsample","Ncase","Ncontrol","Nsnp","snpid","a1","a2","freq","pval","n","z","OR","se","code","imp","ncas","ncont" - "GIANT_HEIGHT_Wood_et_al.txt","GIANT","HEIGHT","Height","Anthropometry",253288, na, na, 2550858, "MarkerName", "Allele1", "Allele2", "Freq.Allele1.HapMapCEU","p","N","b",na,"SE",na,na,na,na + :header: "filename","consortia","outcome","fullName","type","Nsample","Ncase","Ncontrol","Nsnp","snpid","a1","a2","freq","pval","n","z","OR","se","code","imp","ncas","ncont","imputation_quality" + "GIANT_HEIGHT_Wood_et_al.txt","GIANT","HEIGHT","Height","Anthropometry",253288, na, na, 2550858, "MarkerName", "Allele1", "Allele2", "Freq.Allele1.HapMapCEU","p","N","b",na,"SE",na,na,na,na, "imputationInfo" Command line usage example: diff --git a/jass_preprocessing/map_gwas.py b/jass_preprocessing/map_gwas.py index 9d4c94d..0fb8534 100644 --- a/jass_preprocessing/map_gwas.py +++ b/jass_preprocessing/map_gwas.py @@ -169,7 +169,7 @@ def read_gwas( gwas_internal_link, column_map, imputation_treshold=None): print(fullGWAS.head()) if imputation_treshold: - fullGWAS = fullGWAS.loc[fullName.imputation_quality > imputation_treshold] + fullGWAS = fullGWAS.loc[fullGWAS.imputation_quality > imputation_treshold] fullGWAS = fullGWAS[~fullGWAS.index.duplicated(keep='first')] #fullGWAS = convert_missing_values(fullGWAS) -- GitLab