Skip to content

Instantly share code, notes, and snippets.

@wjrl
wjrl / adjToSif.py
Last active February 10, 2017 08:19
Converts adjacency matrix text file to a .sif file and a .noa file for node layout
#!/usr/bin/env python
import csv
import sys
import os
if len(sys.argv) != 3:
sys.exit('Usage: [python] adjToSif.py linkTag inFile')
linkTag = sys.argv[1]
fileName = sys.argv[2]
@wjrl
wjrl / igraphToSif.R
Last active June 12, 2017 01:53
Export igraph graph from R as SIF file for import into BioFabric
# if you don't have igraph:
#install.packages("igraph")
library(igraph)
#
# We only work with graphs that have node name attributes! If
# graph does not already have them, apply this function to it!
#