diff --git a/jass_preprocessing/map_gwas.py b/jass_preprocessing/map_gwas.py index 7c3b6e01f84513b0c169bd56a81da9769e0987a9..3cf1a5cfe45c244e9076515d6149545c1ca636c1 100644 --- a/jass_preprocessing/map_gwas.py +++ b/jass_preprocessing/map_gwas.py @@ -152,13 +152,13 @@ def read_gwas( gwas_internal_link, column_map): compression=compression, #column_dict['label_position'].keys(), names= column_map.index, - index_col=0, header=0, na_values= ['', '#N/A', '#N/A', 'N/A','#NA', '-1.#IND', '-1.#QNAN', '-NaN', '-nan', '1.#IND', '1.#QNAN', 'N/A', 'NA', 'NULL', 'NaN', - 'nan', 'na', '.']) - - + 'nan', 'na', '.', '-'], dtype={"snpid":str, "a1":str,"a2":str,"freq":float, "z":float,"se":float, "pval":float}) + print(fullGWAS.head()) + fullGWAS.set_index("snpid", inplace=True) + print(fullGWAS.head()) fullGWAS = fullGWAS[~fullGWAS.index.duplicated(keep='first')] #fullGWAS = convert_missing_values(fullGWAS)