class Bio::Spidey::Report::SeqDesc
SeqDesc stores sequence information of query or subject.
Attributes
definition[R]
Definition of the sequence.
entry_id[R]
Identifier of the sequence.
len[R]
Length of the sequence.
Public Class Methods
new(seqid, seqdef, len)
click to toggle source
Creates a new SeqDesc object. It is designed to be called from Bio::Spidey::Report::* classes. Users shall not call it directly.
# File lib/bio/appl/spidey/report.rb, line 84 def initialize(seqid, seqdef, len) @entry_id = seqid @definition = seqdef @len = len end
parse(str)
click to toggle source
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.
# 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