class Bio::GFF::GFF3::SequenceRegion
Stores meta-data “##sequence-region seqid start end”.
Attributes
end[RW]
end position
seqid[RW]
sequence ID
start[RW]
start position
Public Class Methods
new(seqid, start, endpos)
click to toggle source
creates a new SequenceRegion
class
# File lib/bio/db/gff.rb 1062 def initialize(seqid, start, endpos) 1063 @seqid = seqid 1064 @start = start ? start.to_i : nil 1065 @end = endpos ? endpos.to_i : nil 1066 end
parse(str)
click to toggle source
parses given string and returns SequenceRegion
class
# File lib/bio/db/gff.rb 1069 def self.parse(str) 1070 _, seqid, start, endpos = 1071 str.chomp.split(/\s+/, 4).collect { |x| unescape(x) } 1072 self.new(seqid, start, endpos) 1073 end
Public Instance Methods
==(other)
click to toggle source
Returns true if self == other. Otherwise, returns false.
# File lib/bio/db/gff.rb 1093 def ==(other) 1094 if other.class == self.class and 1095 other.seqid == self.seqid and 1096 other.start == self.start and 1097 other.end == self.end then 1098 true 1099 else 1100 false 1101 end 1102 end
to_s()
click to toggle source
string representation
# File lib/bio/db/gff.rb 1085 def to_s 1086 i = escape_seqid(column_to_s(@seqid)) 1087 s = escape_seqid(column_to_s(@start)) 1088 e = escape_seqid(column_to_s(@end)) 1089 "##sequence-region #{i} #{s} #{e}\n" 1090 end