Commit c92fa7ce authored by Enza Colonna's avatar Enza Colonna
Browse files

safety commit

parent bfdedd0d
This diff is collapsed.
This diff is collapsed.
['rs1060501114\n', 'rs1060501127\n', 'rs1060501130\n', 'rs1060501135\n']
[
[
"rs1060501114",
{}
],
[
"rs1060501127",
{}
],
[
"rs1060501130",
{}
],
[
"rs1060501135",
{}
],
[
"rs1060501136",
{}
],
[
"rs1060501142",
{}
],
[
"rs1060501145",
{}
],
[
"rs1064792926",
{}
],
[
"rs1131691708",
{}
]
]
......@@ -32,10 +32,10 @@ def getfreqfromVEPbulck (listOfrsid):
for var in elem["colocated_variants"]:
#rsid=var["id"]
if 'frequencies' in var: freq_dict=var["frequencies"]
listOfDict.append((rsid, freq_dict))
return listOfDict
listOfDict.append((rsid, freq_dict))
return listOfDict
#return decoded
def getfreqfromVEP (rsid):
freq_dict={}
......@@ -50,10 +50,6 @@ def getfreqfromVEP (rsid):
if "frequencies" in var: freq_dict=var["frequencies"]
return freq_dict
def get_rsID (line):
linesp=line.rstrip().split()
myrs=[ i for i in linesp if "rs" in i]
return myrs[0]
def main():
parser = argparse.ArgumentParser()
......@@ -64,15 +60,15 @@ def main():
with open(args.f) as myf:
allrsId = myf.readlines()
#thislist=["rs12720452", "rs1060501130"]
print (allrsId[1:5])
result = getfreqfromVEPbulck(allrsId[1:100])
print(json.dumps(result, indent=2))
#print (result)
for rsinfo in result:
rsdict=rsinfo[1]; rsname=rsinfo[0]
if not any(rsdict): print (rsname) #, rsdict, "RARE")
elif compareFreq(rsdict, args.t ): print(rsname) #, rsdict, "YAY, RARE" )
#else: print(rsname, rsdict, "DISCARDED")
#mydict = getfreqfromVEP(rselem)
#if not any(mydict): print (rselem) #, mydict , "RARE")
#elif compareFreq(mydict, args.t ): print(rselem) #, mydict, "YAY, RARE" )
#else: print(mydict, "DISCARDED")
#print(json.dumps(result, indent=2))
#print (result)
if __name__ == "__main__":
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment