class Bio::GFF::GFF3::SequenceRegion
Stores meta-data “##sequence-region seqid start end”.
Attributes
end position
sequence ID
start position
Public Class Methods
Source
# File lib/bio/db/gff.rb 1068 def initialize(seqid, start, endpos) 1069 @seqid = seqid 1070 @start = start ? start.to_i : nil 1071 @end = endpos ? endpos.to_i : nil 1072 end
creates a new SequenceRegion
class
Source
# File lib/bio/db/gff.rb 1075 def self.parse(str) 1076 _, seqid, start, endpos = 1077 str.chomp.split(/\s+/, 4).collect { |x| unescape(x) } 1078 self.new(seqid, start, endpos) 1079 end
parses given string and returns SequenceRegion
class
Public Instance Methods
Source
# File lib/bio/db/gff.rb 1099 def ==(other) 1100 if other.class == self.class and 1101 other.seqid == self.seqid and 1102 other.start == self.start and 1103 other.end == self.end then 1104 true 1105 else 1106 false 1107 end 1108 end
Returns true if self == other. Otherwise, returns false.
Source
# File lib/bio/db/gff.rb 1091 def to_s 1092 i = escape_seqid(column_to_s(@seqid)) 1093 s = escape_seqid(column_to_s(@start)) 1094 e = escape_seqid(column_to_s(@end)) 1095 "##sequence-region #{i} #{s} #{e}\n" 1096 end
string representation