Module: Bio::SignalP::Common
- Included in:
- Version3::Result, Version4::Result
- Defined in:
- lib/bio/appl/common.rb
Overview
A module for methods common to different SignalP version Result classes.
Instance Method Summary collapse
-
#cleave(sequence) ⇒ Object
Given an amino acid sequence (as a string), chop it off and return the remnants.
-
#to_bool(string) ⇒ Object
Simple method: ‘Y’ => true, ‘N’ => false, else nil.
Instance Method Details
#cleave(sequence) ⇒ Object
Given an amino acid sequence (as a string), chop it off and return the remnants. Requires that the cleavage_site method be implemented
72 73 74 75 76 77 78 |
# File 'lib/bio/appl/common.rb', line 72 def cleave(sequence) if signal? return sequence[cleavage_site-1..sequence.length-1] else return sequence end end |
#to_bool(string) ⇒ Object
Simple method: ‘Y’ => true, ‘N’ => false, else nil
81 82 83 84 85 86 87 88 89 |
# File 'lib/bio/appl/common.rb', line 81 def to_bool(string) if string === 'Y' return true elsif string === 'N' return false else return nil end end |