public static Location location ( int start , int end , Strand strand , int length ) { int min = Math . min ( start , end ) ; //if this is true then we have a coord on the +ve strand even though Strand could be negative boolean isReverse = ( min != start ) ; if ( isReverse ) { return new SimpleLocation ( new SimplePoint ( start ) . reverse ( length ) , new SimplePoint ( end ) . reverse ( length ) , strand ) ; } return new SimpleLocation ( start , end , strand ) ; }
Returns a location object which unlike the location constructors allows you to input reverse coordinates and will convert these into the right location on the positive strand .