libraries/PlateReaderHelper.rb
# TODO: Make opts hash allow usner to use to transfer sample matrix by some offset index  
Make opts hash allow usner to use to transfer sample matrix by some offset index
Make opts hash allow usner to use to transfer sample matrix by some offset index
def transfer_sample_matrix(source_collection:, destination_collection:) 
    destination_collection = collection_from(destination_collection)
    source_collection = collection_from(source_collection)
    if (source_collection.dimensions == destination_collection.dimensions)
      source_matrix = source_collection.matrix
      destination_collection.matrix = source_matrix
    else
      destination_collection.matrix = source_collection.matrix.flatten.each_slice(destination_collection.object_type.columns).map {|row| row }
    end
    destination_collection.save()
    return destination_collection
  end
def transfer_sample_matrix ( source_collection : , destination_collection : ) destination_collection = collection_from ( destination_collection ) source_collection = collection_from ( source_collection ) if ( source_collection . dimensions == destination_collection . dimensions ) source_matrix = source_collection . matrix destination_collection . matrix = source_matrix else destination_collection . matrix = source_collection . matrix . flatten . each_slice ( destination_collection . object_type . columns ) . map { | row | row } end destination_collection . save ( ) return destination_collection end
TODO: Make opts hash allow usner to use to transfer sample matrix by some offset index
TODO : Make opts hash allow usner to use to transfer sample matrix by some offset index
#, opt: {starting_idx: [0,0]})
source_collection
destination_collection