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 1033 1033: def initialize(seqid, start, endpos) 1034: @seqid = seqid 1035: @start = start ? start.to_i : nil 1036: @end = endpos ? endpos.to_i : nil 1037: end
parses given string and returns SequenceRegion class
# File lib/bio/db/gff.rb, line 1040 1040: def self.parse(str) 1041: dummy, seqid, start, endpos = 1042: str.chomp.split(/\s+/, 4).collect { |x| URI.unescape(x) } 1043: self.new(seqid, start, endpos) 1044: end
Returns true if self == other. Otherwise, returns false.
# File lib/bio/db/gff.rb, line 1064 1064: def ==(other) 1065: if other.class == self.class and 1066: other.seqid == self.seqid and 1067: other.start == self.start and 1068: other.end == self.end then 1069: true 1070: else 1071: false 1072: end 1073: end