Class | Bio::GFF::GFF3::SequenceRegion |
In: |
lib/bio/db/gff.rb
|
Parent: | Object |
end | [RW] | end position |
seqid | [RW] | sequence ID |
start | [RW] | start position |
creates a new SequenceRegion class
# File lib/bio/db/gff.rb, line 1060 1060: def initialize(seqid, start, endpos) 1061: @seqid = seqid 1062: @start = start ? start.to_i : nil 1063: @end = endpos ? endpos.to_i : nil 1064: end
parses given string and returns SequenceRegion class
# File lib/bio/db/gff.rb, line 1067 1067: def self.parse(str) 1068: dummy, seqid, start, endpos = 1069: str.chomp.split(/\s+/, 4).collect { |x| unescape(x) } 1070: self.new(seqid, start, endpos) 1071: end
Returns true if self == other. Otherwise, returns false.
# File lib/bio/db/gff.rb, line 1091 1091: def ==(other) 1092: if other.class == self.class and 1093: other.seqid == self.seqid and 1094: other.start == self.start and 1095: other.end == self.end then 1096: true 1097: else 1098: false 1099: end 1100: end