camaralab / sctda Goto Github PK
View Code? Open in Web Editor NEWAn object oriented python library for topological data analysis of high-throughput single-cell RNA-seq data
License: GNU General Public License v3.0
An object oriented python library for topological data analysis of high-throughput single-cell RNA-seq data
License: GNU General Public License v3.0
Hi Pablo,
Congrats on the publication of your nice work on scTDA. I am interested in analyze some of my data with it. When I look through your tutorial, I found, however, the link to the source notebook and data files is no longer existed. Could you please update it?
Also, does your software has to have a Ayasdi account? Do you have a tutorial to run your motor neuron data with the free available mapper?
Thanks
Hi,
I receive the following error while trying to draw a list of genes, probably due to changes in the underlying matplotlib API:
c.draw(['GRIA1', 'SLC1A3']);
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-36-4449e82bda2b> in <module>()
----> 1 c.draw(['GRIA1','SLC1A3']);
/Users/user/.pyenv/versions/2.7.15/Python.framework/Versions/2.7/lib/python2.7/site-packages/scTDA/main.pyc in draw(self, color, connected, labels, ccmap, weight, save, ignore_log, table, axis, a)
1230 values = [(1.0-colorb[node]/bmax, max(1.0-(colorr[node]/rmax+colorb[node]/bmax), 0.0),
1231 1.0-colorr[node]/rmax) for node in pg.nodes()]
-> 1232 networkx.draw_networkx_nodes(pg, pos, node_color=values, node_size=sizes)
1233 polca = [(colorr[node], colorb[node]) for node in pg.nodes()]
1234 elif type(color) == list and len(color) == 3:
/Users/user/.pyenv/versions/2.7.15/Python.framework/Versions/2.7/lib/python2.7/site-packages/networkx/drawing/nx_pylab.pyc in draw_networkx_nodes(G, pos, nodelist, node_size, node_color, node_shape, alpha, cmap, vmin, vmax, ax, linewidths, edgecolors, label, **kwds)
412 linewidths=linewidths,
413 edgecolors=edgecolors,
--> 414 label=label)
415
416 node_collection.set_zorder(2)
/Users/user/.pyenv/versions/2.7.15/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/__init__.pyc in inner(ax, *args, **kwargs)
1853 "the Matplotlib list!)" % (label_namer, func.__name__),
1854 RuntimeWarning, stacklevel=2)
-> 1855 return func(ax, *args, **kwargs)
1856
1857 inner.__doc__ = _add_data_doc(inner.__doc__,
/Users/user/.pyenv/versions/2.7.15/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, **kwargs)
4277 raise ValueError("c of shape {} not acceptable as a color "
4278 "sequence for x with size {}, y with size {}"
-> 4279 .format(c.shape, x.size, y.size))
4280 else:
4281 colors = None # use cmap, norm after collection is created
AttributeError: 'list' object has no attribute 'shape'
c
is an UnrootedGraph initialized through Ayasdi.
scTDA==0.97
matplotlib==2.2.2
networkx==2.1
Francesco
Some planned enhancements in scTDA (in random order):
Hi @pcamara , I read your paper and you did an amazing tool, and now we want to use it in the lab.
We tried to use our own data following the previous comments in the 'Data Input' issue, and the network looks like we expected but we're having some issues, since we are not seeing the patterns we were expecting (when coloring by regulon or by timepoints).
When using your data everything works well but we wonder why is it that ours doesn't work, as far as we are aware of, our name.all.tsv has the same format as the one in the tutorial.
Any idea of what can we be doing wrong?
I can provide more details about the issue.
Thanks!
This is not an issue for the package per se. But I am wondering where can I access the mouse neocortex data used in your nice scTDA work? The link you provided in your paper (https://vpn.ias.edu/science2016/,DanaInfo=genebrowser.unige.ch+telley_govindan_science2016.tgz) is password protected. If you can share with a dropbox link or so, that will be great!
Hi pcamara,
I am new to bioinformatics, I came across your nature biotech paper and found the scTDA seemed to be very useful for single-cell analysis, at least the topological stuff makes more sense than current packages. Just wonder, if all I have is a gene expression matrix in which rows correspond to genes and columns correspond to cells, with first row of cell ids and first column for gene ids. How can I input the matrix to scTDA pre-process function?
Best!
Gary
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.
Dear Pablo,
Hope you are doing fine. I am trying to run scTDA on one of our datasets and I am facing this error:
total of 616 patches required clustering
this implies 1693 nodes in the mapper graph
Traceback (most recent call last):
File "scTDA_Tutorial.py", line 161, in
c = scTDA.RootedGraph('Embryo_pca_25_0.40', 'Embryo.no_subsampling.tsv', groups=False)
File "/Users/pra7mx/anaconda/lib/python2.7/site-packages/scTDA/main.py", line 1531, in init
self.g3, self.dicdend = self.dendritic_graph()
File "/Users/pra7mx/anaconda/lib/python2.7/site-packages/scTDA/main.py", line 1503, in dendritic_graph
dil = networkx.shortest_path_length(self.gl, self.root, k)
File "/Users/pra7mx/anaconda/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/pra7mx/anaconda/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/pra7mx/anaconda/lib/python2.7/site-packages/networkx/algorithms/shortest_paths/unweighted.py", line 186, in _bidirectional_pred_succ
for w in Gsucc(v):
File "/Users/pra7mx/anaconda/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.
Can you please help me with this.
Thanks,
Cheers !!
Praneet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.