Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. humancoords = dict()
  2.  
  3. gzed = urllib.urlopen(HUMANCOORDS_REMOTE_FILE).read()
  4. content = gzip.GzipFile(fileobj=StringIO.StringIO(gzed))
  5. lines = (x.strip() for x in content)
  6. data = (x.split("\t") for x in lines)
  7. filtered = (x for x in data if x[11]=="GENE" and x[12]=="Primary Assembly")
  8.  
  9. for ar in filtered:
  10.     humanid = ar[10].replace("GeneID:", "") # GeneID:100131754
  11.     humancoords[humanid] = (ar[1], ar[2], ar[3], ar[4])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement