Here is the perl code I use to put PPI into an undirected graph. It is only concerned with extracting protein IDs and Pubmed refs but you can easily modify it to get the rest.
use Graph::Undirected;
my $G = Graph::Undirected->new();
my %notfound;
open (FH,"<",$BIOGRID) or die "Can't open file $BIOGRID: $!\n";
while (my $line=<FH>) {
chomp($line);
my @tmpary = split(/\t/,$line);
my @P1s = split(/\|/,$tmpary[2]);
my ($p1) = $P1s[0]=~/:(.+)/;
my @P2s = split(/\|/,$tmpary[3]);
my ($p2) = $P2s[0]=~/:(.+)/;
next if (!$p1 || !$p2 || $notfound{$p1} || $notfound{$p2});
my $EnsemblID1 = &get_EnsemblID($p1); # This is a function to convert to Ensembl IDs
my $EnsemblID2 = &get_EnsemblID($p2);
if ($EnsemblID1 && $EnsemblID2) {
$G->add_edge($EnsemblID1,$EnsemblID2);
if ($tmpary[8]) {
my ($pmid) = $tmpary[8];
$G->set_edge_attribute($EnsemblID1,$EnsemblID2,'pubmed',$pmid);
}
}
else {
if (!$EnsemblID1) {
$notfound{$p1}++;
}
if (!$EnsemblID2) {
$notfound{$p2}++;
}
}
}
close FH;