Sha256: 9b5a43cf8d723f50dcd3e42e0f552818bf303f5bbbafa5324cef5b0163abcc20

Contents?: true

Size: 375 Bytes

Versions: 2

Compression:

Stored size: 375 Bytes

Contents

class GenomerPluginValidate::Validator::DuplicateCoordinates < Genomer::Plugin

  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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genomer-plugin-validate-0.0.2 lib/genomer-plugin-validate/validator/duplicate_coordinates.rb
genomer-plugin-validate-0.0.1 lib/genomer-plugin-validate/validator/duplicate_coordinates.rb