Sha256: 4bc885e31941bc5aaa7d3e0e211c584e116319b6ff68f6c4c81ab2daa62f002f

Contents?: true

Size: 709 Bytes

Versions: 9

Compression:

Stored size: 709 Bytes

Contents

module Ms ; end
module Ms::Sequest ; end

class Ms::Sequest::Params

  # returns a Ms::Ident::Pepxml::SampleEnzyme object
  def sample_enzyme
    Ms::Ident::Pepxml::SampleEnzyme.new(sample_enzyme_hash)
  end

  # returns a hash suitable for setting a Ms::Ident::Pepxml::SampleEnzyme object
  def sample_enzyme_hash
    (offset, cleave_at, except_if_after) = enzyme_specificity.map do |v|
      if v == '' ; nil ; else v end
    end
    hash = {}
    hash[:name] = self.enzyme
    hash[:cut] = cleave_at
    hash[:no_cut] = except_if_after
    hash[:sense] =
      if hash[:name] == "No_Enzyme"
        nil
      elsif offset == 1
        'C'
      elsif offset == 0
        'N'
      end
    hash
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ms-sequest-0.1.2 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.1.1 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.1.0 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.24 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.23 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.22 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.21 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.20 lib/ms/sequest/pepxml/params.rb
ms-sequest-0.0.18 lib/ms/sequest/pepxml/params.rb