Skip to content
Snippets Groups Projects
Commit 437be196 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

treat exception when missing position

parent e7fde0e3
No related branches found
No related tags found
No related merge requests found
Pipeline #94972 passed
......@@ -21,8 +21,10 @@ def read_reference(gwas_reference_panel, mask_MHC=False, minimum_MAF=None, regio
"""
ref = pd.read_csv(gwas_reference_panel, header=None, sep= "\t",
names =[ 'chr', "snp_id", "MAF","pos", "ref", "alt"],
dtype = {"chr": str, "snp_id":str, "MAF": np.double, "pos":np.int64, "ref":str, "alt":str},
dtype = {"chr": str, "snp_id":str, "MAF": np.double, "pos":np.double, "ref":str, "alt":str},
index_col="snp_id")
ref = ref.loc[~ref.pos.isnull()]
ref.pos = ref.pos.astype('int')
def sorted_alleles(x):
return "".join(sorted(x))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment