diff --git a/system/dataset.py b/system/dataset.py index 29f6bdd..2362d9b 100644 --- a/system/dataset.py +++ b/system/dataset.py @@ -160,10 +160,6 @@ class Dataset: """Returns dataset name""" return self._name - def get_matrix(self): - """Returns internal numeric matrix for dataset.""" - return self._array - def get_all_dims(self): """Returns all dimensions in project""" return self._all_dims diff --git a/system/plots.py b/system/plots.py index 3c4d6c0..212ac15 100644 --- a/system/plots.py +++ b/system/plots.py @@ -386,7 +386,7 @@ class LinePlot(Plot): import rpy silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r) - rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", dataset.get_matrix()) + rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", dataset.asarray()) ymin, ymax = rpy.r("range(m)*1.1") self._ymin, self._ymax = ymin, ymax silent_eval("res <- apply(m, 2, density, from=%s, to=%s)" % (ymin, ymax)) @@ -420,7 +420,7 @@ class LinePlot(Plot): ids = selection[dim_2] # current identifiers index = [ind for id,ind in self._dataset[dim_2].items() if id in ids] #conversion to index for i in index: - line = self._dataset.get_matrix()[i] + line = self._dataset.asarray()[i] self.ax.plot(range(1, len(line)+1), line) self.ax.set_xlim((0.5, cols+0.5)) diff --git a/workflows/affy_workflow.py b/workflows/affy_workflow.py index 602e109..5a4e756 100644 --- a/workflows/affy_workflow.py +++ b/workflows/affy_workflow.py @@ -203,7 +203,7 @@ class PCAFunction(workflow.Function): dim_2, dim_1 = data.get_dim_names() silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r) - rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.get_matrix()) + rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.asarray()) silent_eval("t = prcomp(t(m))") # we make a unique name for component dimension diff --git a/workflows/go_workflow.py b/workflows/go_workflow.py index 4a893c6..3dd9f73 100644 --- a/workflows/go_workflow.py +++ b/workflows/go_workflow.py @@ -236,7 +236,7 @@ class PCAFunction(workflow.Function): silent_eval = rpy.with_mode(rpy.NO_CONVERSION, rpy.r) - rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.get_matrix()) + rpy.with_mode(rpy.NO_CONVERSION, rpy.r.assign)("m", data.asarray()) silent_eval("t = prcomp(t(m))") T_ids = map(str, range(1, rpy.r("dim(t$x)")[1]+1))