Class: GenomerPluginValidate::Validator::DuplicateCoordinates

Inherits:
Genomer::Plugin
  • Object
show all
Defined in:
lib/genomer-plugin-validate/validator/duplicate_coordinates.rb

Instance Method Summary collapse

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
# File 'lib/genomer-plugin-validate/validator/duplicate_coordinates.rb', line 3

def run
  annotations.
    group_by{|attn| [attn.start, attn.end].sort }.
    select{|_,v| v.length > 1}.
    map{|(coords,attns)| attns.map(&:id).sort }.
    map{|attns| attns.map{|attns| "'#{attns}'"}.join(', ') }.
    map{|attns| "Identical locations for #{attns}" }
end