YeoLab / flotilla

Reproducible machine learning analysis of gene expression and alternative splicing data
http://yeolab.github.io/flotilla/docs
BSD 3-Clause "New" or "Revised" License
121 stars 26 forks source link

Flotilla errors with study.plot_graph() #328

Closed LeenMachine closed 8 years ago

LeenMachine commented 8 years ago
> ---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)
<ipython-input-18-39d9aa0cdf69> in <module>()
----> 1 cardiac.plot_graph()

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/flotilla/study.pyc in plot_graph(self, data_type, sample_subset, feature_subset, featurewise, **kwargs)
    919                 label_to_marker=label_to_marker, groupby=groupby,
    920                 featurewise=featurewise,
--> 921                 **kwargs)
    922         elif data_type == "splicing":
    923             return self.splicing.networks.draw_graph(

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/flotilla/visualize/network.pyc in draw_graph(self, n_pcs, use_pc_1, use_pc_2, use_pc_3, use_pc_4, degree_cut, cov_std_cut, weight_function, featurewise, rpkms_not_events, feature_of_interest, draw_labels, reduction_name, feature_ids, sample_ids, graph_file, compare, sample_id_to_color, label_to_color, label_to_marker, groupby, data_type)
    132                 return 95
    133 
--> 134         ax_pev.plot(pca.explained_variance_ratio_ * 100.)
    135         ax_pev.axvline(n_pcs, label='cutoff', color=green)
    136         ax_pev.legend()

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.pyc in inner(ax, *args, **kwargs)
   1810                     warnings.warn(msg % (label_namer, func.__name__),
   1811                                   RuntimeWarning, stacklevel=2)
-> 1812             return func(ax, *args, **kwargs)
   1813         pre_doc = inner.__doc__
   1814         if pre_doc is None:

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.pyc in plot(self, *args, **kwargs)
   1423 
   1424         for line in self._get_lines(*args, **kwargs):
-> 1425             self.add_line(line)
   1426             lines.append(line)
   1427 

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in add_line(self, line)
   1706             line.set_clip_path(self.patch)
   1707 
-> 1708         self._update_line_limits(line)
   1709         if not line.get_label():
   1710             line.set_label('_line%d' % len(self.lines))

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in _update_line_limits(self, line)
   1728         Figures out the data limit of the given line, updating self.dataLim.
   1729         """
-> 1730         path = line.get_path()
   1731         if path.vertices.size == 0:
   1732             return

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/lines.pyc in get_path(self)
    923         """
    924         if self._invalidy or self._invalidx:
--> 925             self.recache()
    926         return self._path
    927 

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/matplotlib/lines.pyc in recache(self, always)
    610                 x = ma.asarray(xconv, np.float_).filled(np.nan)
    611             else:
--> 612                 x = np.asarray(xconv, np.float_)
    613             x = x.ravel()
    614         else:

/Users/leenjamal/anaconda2/lib/python2.7/site-packages/numpy/core/numeric.pyc in asarray(a, dtype, order)
    472 
    473     """
--> 474     return array(a, dtype, copy=False, order=order)
    475 
    476 def asanyarray(a, dtype=None, order=None):

ValueError: could not convert string to float: pc_229'

> 
olgabot commented 8 years ago

Fixed by https://github.com/YeoLab/flotilla/commit/d92d3c0258819487db3084217ba82b1e407ae8b8