class Bio::PolyploidTools::ChromosomeArm

Public Class Methods

getArmSelection(name) click to toggle source
# File lib/bio/PolyploidTools/ChromosomeArm.rb, line 42
def self.getArmSelection(name)
  arr = name.split(",")
  if arr.size == 2
     @@arm_selection_functions[name.to_sym] = lambda do |contig_name|
        separator, field = arr
        field = field.to_i
        ret = contig_name.split(separator)[field]
        return ret
      end
  end
  @@arm_selection_functions[name.to_sym]
end
getValidFunctions() click to toggle source
# File lib/bio/PolyploidTools/ChromosomeArm.rb, line 55
def self.getValidFunctions
  tmp = @@arm_selection_functions.keys.map { |e| e.to_s }
  tmp.unshift "<sep>,<index>"
  tmp
end