How should I proceed to rootGraph without a Ayasdi account
2d2d2d2d2d opened this issue · 1 comments
After playing with the tutorial, I tried to run the whole thing with my own data. But I got stuck at the rootgraph. Since I don't have a Ayasdi account, I cannot generate those Embryo_mds.gexf and .json files, which are used in rooted graph.
Then I tried to just use Embryo_pcaa_25_0.40.gexf and .json file generated previously by calling TopologicalRepresentation.save() as input for rootgraph. Then I got this error and I don't know what to do next. Could you help me out here?
Traceback (most recent call last): File "/Users/dingqituo/untitled3/scTDA Tutorial/embryo.py", line 4, in <module> c = scTDA.RootedGraph('Embryo_pca_25_0.40', 'Embryo.no_subsampling.tsv', groups=False) File "/Users/dingqituo/untitled3/scTDA Tutorial/scTDA.py", line 1539, in __init__ self.g3, self.dicdend = self.dendritic_graph() File "/Users/dingqituo/untitled3/scTDA Tutorial/scTDA.py", line 1511, in dendritic_graph dil = networkx.shortest_path_length(self.gl, self.root, k) File "/Users/dingqituo/anaconda/envs/python2/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/generic.py", line 245, in shortest_path_length p=nx.bidirectional_shortest_path(G,source,target) File "/Users/dingqituo/anaconda/envs/python2/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/unweighted.py", line 136, in bidirectional_shortest_path results=_bidirectional_pred_succ(G,source,target) File "/Users/dingqituo/anaconda/envs/python2/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/unweighted.py", line 186, in _bidirectional_pred_succ for w in Gsucc(v): File "/Users/dingqituo/anaconda/envs/python2/lib/python2.7/site-packages/networkx/classes/graph.py", line 1084, in neighbors_iter raise NetworkXError("The node %s is not in the graph." % (n,)) networkx.exception.NetworkXError: The node 0 is not in the graph.
scTDA works well without an Ayasdi account, as indicated in the tutorial. To that end use the topological representation generated through TopologicalRepresentation.save(). For instance, in section 3 of the tutorial you could use the following command to load the representation produced in section 2 through TopologicalRepresentation.save():
c = scTDA.RootedGraph('Embryo_pca_25_0.40', 'Embryo.no_subsampling.tsv', groups=False)
Please make sure that you have installed the most recent update of scTDA. To that end, uninstall the installed version, clone this repository using git, and install the most recent version using:
sudo python setup.py install
For optimal visualization, it is also strongly recommended to have graphviz installed.