def distance(self, e):
if e.chrom != self.chrom:<EOL><INDENT>raise GenomicIntervalError("<STR_LIT>" + str(self) +<EOL>"<STR_LIT>" + str(e) + "<STR_LIT>" +<EOL>"<STR_LIT>")<EOL><DEDENT>dist = <NUM_LIT:0><EOL>if not e.intersects(self):<EOL><INDENT>dist = max(self.start, e.start) - min(self.end, e.end)<EOL><DEDENT>return dist<EOL>
Distance between this interval and e -- number of nucleotides.

We consider intervals that overlap to have a distance of 0 to each other.
The distance between two intervals on different chromosomes is considered
undefined, and causes an exception to be raised.

:return: the distance from this GenomicInterval to e.
:param e: the other genomic interval to find the distance to.
:raise GenomicIntervalError: if self and e are on different chromosomes.