Class: Bio::GenomicInterval

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/maf/maf.rb,
lib/bio/ucsc/genomic-interval-bin.rb

Instance Method Summary collapse

Instance Method Details

#binObject



5
6
7
# File 'lib/bio/ucsc/genomic-interval-bin.rb', line 5

def bin
  Bio::Ucsc::UcscBin.bin(self.zero_start, self.zero_end)
end

#bin_allObject



9
10
11
# File 'lib/bio/ucsc/genomic-interval-bin.rb', line 9

def bin_all
  Bio::Ucsc::UcscBin.bin_all(self.zero_start, self.zero_end)
end

#intersection(other) ⇒ Object

Raises:

  • (ArgumentError)


5
6
7
8
9
10
# File 'lib/bio/maf/maf.rb', line 5

def intersection(other)
  raise ArgumentError unless self.chrom == other.chrom
  GenomicInterval.new(self.chrom,
                      [self.chr_start, other.chr_start].max,
                      [self.chr_end, other.chr_end].min)
end