Created
February 22, 2014 23:52
-
-
Save ngopal/9164294 to your computer and use it in GitHub Desktop.
make a list of nodes from human PPI data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, sys | |
from itertools import chain, combinations | |
genes_set = set([]) | |
for i in open(sys.argv[1], 'r').readlines(): | |
if '#' in i: | |
continue | |
else: | |
line = i.strip('\r\n').split('\t') | |
genes = line[2].replace('_HUMAN','').split(',') | |
score = line[3] | |
for k in genes: | |
genes_set.add(k) | |
for index, item in enumerate(list(genes_set)): | |
print str(str(index)+'\t'+str(item)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment