In [16]:
curl -s --compressed http://www.pathwaycommons.org/archives/PC2/current/PathwayCommons.8.All.BINARY_SIF.hgnc.txt.sif.gz \
| gunzip > pc.sif




In [14]:
head -6 pc.sif


A1BG	controls-expression-of	A2M
A1BG	interacts-with	ABCC6
A1BG	controls-phosphorylation-of	AKT1
A1BG	controls-state-change-of	AKT1
A1BG	interacts-with	ANXA7
A1BG	interacts-with	CDKN1A

In [12]:
egrep $'\tinteracts-with\t|\tin-complex-with\t|neighbor-of' pc.sif | wc -l


523498

In [13]:
egrep $'\tinteracts-with\t|\tin-complex-with\t|neighbor-of' pc.sif \
   | gawk '{ print $1 "\n"  $3 }' | sort -u | wc -l


17020

In [10]:
egrep $'\tinteracts-with\t|\tin-complex-with\t|neighbor-of' pc.sif \
| gawk '{print ($3 > $1) ? $1 "-" $3 : $3 "-"  $1}'  | sort -u | wc -l


491784

In [15]:
cut -f2 pc.sif | sort | uniq -c | sort -k1 -nr


 369895 interacts-with
 153603 in-complex-with
 135268 chemical-affects
 120948 catalysis-precedes
 110013 controls-expression-of
 106156 controls-state-change-of
  18482 controls-production-of
  16816 consumption-controlled-by
  15636 controls-phosphorylation-of
  13705 used-to-produce
   6960 controls-transport-of
   3607 reacts-with
   2847 controls-transport-of-chemical

In [ ]: