[Biojava-dev] Location overlaps() bug?
graham etherington (TSL)
graham.etherington at sainsbury-laboratory.ac.uk
Fri Dec 14 09:59:37 UTC 2012
Hi,
I've discovered a problem with the overlaps() method in
org.biojava3.genome.parsers.gff.Location.
It appears that if LocationA overlaps LocationB by 1 nucleotide,
overlaps() returns false instead of true.
Here is the code to replicate it
public static void main(String[] args)
{
Location loc1 = new Location(12, 15);
Location loc2 = new Location(15, 20);
if (loc1.overlaps(loc2))
{
System.out.println("Loc1 overlaps Loc2");
}
else
{
System.out.println("No overlap found");
}
}
BioJava version 3.0.5
OS OSX 10.6.8
Cheers,
Graham
Dr. Graham Etherington
Bioinformatics Support Officer,
The Sainsbury Laboratory,
Norwich Research Park,
Norwich NR4 7UH.
UK
Tel: +44 (0)1603 450601
More information about the biojava-dev
mailing list