msmbuilder / msmbuilder-legacy

Legacy release of MSMBuilder
http://msmbuilder.org
GNU General Public License v2.0
25 stars 28 forks source link

Feature Request: Supporting JSON output #377

Closed cxhernandez closed 9 years ago

cxhernandez commented 10 years ago

Would it be possible to add an option to save an adjacency matrix from MSMBuilder as a JSON file?

I have a python script that does this already and it's like two extra lines using the NetworkX python module:

def mtx2JSON(tprob):
    import networkx as nx
    G = nx.from_scipy_sparse_matrix(tprob)
    return str(nx.readwrite.json_graph.dumps(G))
rmcgibbo commented 10 years ago

Why is json preferable to matrix market?

cxhernandez commented 10 years ago

I'm won't argue that it's preferable to matrix market, just wondering if it could be optional since JSON is the format of choice for things like d3.js