Method: Matrix#to_activity

Defined in:
lib/rbbt/matrix.rb

#to_activity(factor = 2) ⇒ Object



177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/rbbt/matrix.rb', line 177

def to_activity(factor = 2)
  require 'rbbt/tsv/change_id'

  name = data_file =~ /:>/ ? File.basename(data_file) : data_file

  file = Persist.persist(data_file, :tsv, :prefix => "Activity #{factor}", :dir => Matrix.matrix_dir.barcode, :no_load => true) do |filename|
    activity_cluster(filename, factor)
  end
  subsets = self.subsets
  matrix = Matrix.new file, labels, value_type, "Ensembl Gene ID", organism
  matrix.subsets = subsets
  matrix
end