Class: Bio::Spidey::Report::SeqDesc
- Defined in:
- lib/bio/appl/spidey/report.rb
Overview
SeqDesc stores sequence information of query or subject.
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Definition of the sequence.
-
#entry_id ⇒ Object
readonly
Identifier of the sequence.
-
#len ⇒ Object
readonly
Length of the sequence.
Class Method Summary collapse
-
.parse(str) ⇒ Object
Parses piece of Spidey result text and creates a new SeqDesc object.
Instance Method Summary collapse
-
#initialize(seqid, seqdef, len) ⇒ SeqDesc
constructor
Creates a new SeqDesc object.
Constructor Details
#initialize(seqid, seqdef, len) ⇒ SeqDesc
Creates a new SeqDesc object. It is designed to be called from Bio::Spidey::Report::* classes. Users shall not call it directly.
84 85 86 87 88 |
# File 'lib/bio/appl/spidey/report.rb', line 84 def initialize(seqid, seqdef, len) @entry_id = seqid @definition = seqdef @len = len end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Definition of the sequence.
94 95 96 |
# File 'lib/bio/appl/spidey/report.rb', line 94 def definition @definition end |
#entry_id ⇒ Object (readonly)
Identifier of the sequence.
91 92 93 |
# File 'lib/bio/appl/spidey/report.rb', line 91 def entry_id @entry_id end |
#len ⇒ Object (readonly)
Length of the sequence.
97 98 99 |
# File 'lib/bio/appl/spidey/report.rb', line 97 def len @len end |
Class Method Details
.parse(str) ⇒ Object
Parses piece of Spidey result text and creates a new SeqDesc object. It is designed to be called from Bio::Spidey::Report::* classes. Users shall not call it directly.
102 103 104 105 106 107 108 |
# File 'lib/bio/appl/spidey/report.rb', line 102 def self.parse(str) /^(Genomic|mRNA)\:\s*(([^\s]*) (.+))\, (\d+) bp\s*$/ =~ str.to_s seqid = $3 seqdef = $2 len = ($5 ? $5.to_i : nil) self.new(seqid, seqdef, len) end |