class Bio::Sim4::Report::SeqDesc
Bio::Sim4::Report::SeqDesc
stores sequence information of query or subject of sim4 report.
Attributes
definition of the sequence
identifier of the sequence
filename of the sequence
sequence length of the sequence
Public Class Methods
Source
# File lib/bio/appl/sim4/report.rb 88 def initialize(seqid, seqdef, len, filename) 89 @entry_id = seqid 90 @definition = seqdef 91 @len = len 92 @filename = filename 93 end
Creates a new object. It is designed to be called internally from Bio::Sim4::Report
object. Users shall not use it directly.
Source
# File lib/bio/appl/sim4/report.rb 106 def self.parse(str, str2 = nil) 107 /^seq[12] \= (.*)(?: \((.*)\))?\,\s*(\d+)\s*bp\s*$/ =~ str 108 seqid = $2 109 filename = $1 110 len = $3.to_i 111 if str2 then 112 seqdef = str2.sub(/^\>\s*/, '') 113 seqid =seqdef.split(/\s+/, 2)[0] unless seqid 114 else 115 seqdef = (seqid or filename) 116 seqid = filename unless seqid 117 end 118 self.new(seqid, seqdef, len, filename) 119 end
Parses part of sim4 result text and creates new SeqDesc
object. It is designed to be called internally from Bio::Sim4::Report
object. Users shall not use it directly.