diff --git a/uk/ac/sanger/artemis/io/Location.java b/uk/ac/sanger/artemis/io/Location.java index f7b4df21e344ba49029b0d988b44dfd09eb7198f..a65e81781420d40d08bd596062a98866a840831e 100644 --- a/uk/ac/sanger/artemis/io/Location.java +++ b/uk/ac/sanger/artemis/io/Location.java @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/Location.java,v 1.6 2005-11-15 12:21:18 tjc Exp $ + * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/Location.java,v 1.7 2005-11-15 14:02:37 tjc Exp $ */ package uk.ac.sanger.artemis.io; @@ -34,7 +34,7 @@ import uk.ac.sanger.artemis.io.LocationLexer.TokenEnumeration; * functions for parsing and manipulating the location. * * @author Kim Rutherford - * @version $Id: Location.java,v 1.6 2005-11-15 12:21:18 tjc Exp $ + * @version $Id: Location.java,v 1.7 2005-11-15 14:02:37 tjc Exp $ * */ public class Location @@ -375,13 +375,7 @@ public class Location **/ public Location reverseComplement(final int sequence_length) { - final Location new_location = new Location(getParsedLocation().copy()); - - new_location.parse_tree = - new_location.getParsedLocation().reverseComplement(sequence_length); - - new_location.parse_tree = new_location.parse_tree.getCanonical(); - return new_location; + return reverseComplement(sequence_length, 1); } /** diff --git a/uk/ac/sanger/artemis/io/LocationParseNode.java b/uk/ac/sanger/artemis/io/LocationParseNode.java index 15ed80472dcbc0e5c81a51bbf12192abc35d44fa..b9748398cfc6cfb0149d6d134316fed065ee15eb 100644 --- a/uk/ac/sanger/artemis/io/LocationParseNode.java +++ b/uk/ac/sanger/artemis/io/LocationParseNode.java @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/LocationParseNode.java,v 1.6 2005-11-15 12:21:18 tjc Exp $ + * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/LocationParseNode.java,v 1.7 2005-11-15 14:02:37 tjc Exp $ */ package uk.ac.sanger.artemis.io; @@ -33,7 +33,7 @@ import uk.ac.sanger.artemis.util.OutOfRangeException; * Location. It is a utility class for EMBL.Location. * * @author Kim Rutherford - * @version $Id: LocationParseNode.java,v 1.6 2005-11-15 12:21:18 tjc Exp $ + * @version $Id: LocationParseNode.java,v 1.7 2005-11-15 14:02:37 tjc Exp $ * **/ @@ -395,17 +395,6 @@ class LocationParseNode extends EMBLObject } } - /** - * Return a reversed and complemented copy of this Location. - * @param sequence_length The length of the sequence that this Location is - * associated with. - * @return a reversed and complemented tree. - **/ - LocationParseNode reverseComplement(final int sequence_length) - { - return reverseComplement(sequence_length, 0); - } - /** * Return a reversed and complemented copy of this Location. * @param sequence_length The length of the sequence that this Location is @@ -432,7 +421,8 @@ class LocationParseNode extends EMBLObject // System.out.println("LocationParseNode.reverseComplement() HERE "+ // start+ ".."+ end +" sequence_length="+sequence_length+ // " range.getEnd()="+range.getEnd()+ " range.getStart()="+range.getStart()+ -// " offset="+offset); +// " offset="+offset+ " "+ +// start_old+ ".."+end_old); final Range new_range = new Range(start, end); final LocationParseNode new_range_node =