class Bio::DB::Faidx::Bio::DB::Faidx::Bio::DB::Fasta::Region
Public Instance Methods
joinRegion(other)
click to toggle source
# File lib/bio-faidx/faidx.rb, line 77 def joinRegion (other) return nil unless self.overlaps(other) out = self.clone out.start = other.start if other.start < out.start out.end = other.end if other.end > out.end return out end
overlap_in_set(set)
click to toggle source
# File lib/bio-faidx/faidx.rb, line 85 def overlap_in_set(set) overlap_set = Set.new set.each do |e| overlap_set << e if self.overlaps(e) end overlap_set end
overlaps(other)
click to toggle source
# File lib/bio-faidx/faidx.rb, line 65 def overlaps (other) return false if other.entry != @entry return true if other.start >= @start and other.start <= @end return true if other.end >= @start and other.end <= @end return false end
subset(other)
click to toggle source
# File lib/bio-faidx/faidx.rb, line 72 def subset (other) return false if other.entry != @entry return true if other.start >= @start and other.end <= @end end