Sha256: 94a28b5d59f0c09507788e8d9555a321b92b146fe46e2aaf2a2b871889561ac1

Contents?: true

Size: 504 Bytes

Versions: 3

Compression:

Stored size: 504 Bytes

Contents

module Mspire ; end
module Mspire::Ident ; end

class Mspire::Ident::Pepxml 
  class SearchHit
    Sequest = Struct.new(:xcorr, :deltacn, :deltacnstar, :spscore, :sprank) do

      # Takes ions in the form XX/YY and returns [XX.to_i, YY.to_i]
      def self.split_ions(ions)
        ions.split("/").map {|ion| ion.to_i }
      end

      def to_xml(builder)
        members.zip(self.to_a) do |sym, val|
          builder.search_score(:name => sym, :value => val)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mspire-sequest-0.2.7 lib/mspire/sequest/srf/pepxml/sequest.rb
mspire-sequest-0.2.6 lib/mspire/sequest/srf/pepxml/sequest.rb
mspire-sequest-0.2.5 lib/mspire/sequest/srf/pepxml/sequest.rb