Bugfix for incPos in GenomeLoc

-- Shouldn't have taken a GenomeLoc as an argument, as it's a instance method, not a public static
This commit is contained in:
Mark DePristo 2013-07-01 14:51:15 -04:00
parent ed0b1c5aba
commit 7be01777f6
1 changed files with 4 additions and 7 deletions

View File

@ -560,24 +560,21 @@ public class GenomeLoc implements Comparable<GenomeLoc>, Serializable, HasGenome
/**
* return a new genome loc, with an incremented position
*
* @param loc the old location
*
* @return a newly allocated GenomeLoc as loc but with start == loc.getStart() + 1
*/
public GenomeLoc incPos(GenomeLoc loc) {
return incPos(loc, 1);
public GenomeLoc incPos() {
return incPos(1);
}
/**
* return a new genome loc, with an incremented position
*
* @param loc the old location
* @param by how much to move the start and stop by
*
* @return a newly allocated GenomeLoc as loc but with start == loc.getStart() + by
*/
public GenomeLoc incPos(GenomeLoc loc, int by) {
return new GenomeLoc(loc.getContig(), loc.getContigIndex(), loc.start + by, loc.stop + by);
public GenomeLoc incPos(int by) {
return new GenomeLoc(getContig(), getContigIndex(), start + by, stop + by);
}
/**