From 4613a682beb08a88ad574069c7df36c5dbc3301a Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 15 Nov 2005 14:02:37 +0000
Subject: [PATCH] tidy & fix

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@3820 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 uk/ac/sanger/artemis/io/Location.java          | 12 +++---------
 uk/ac/sanger/artemis/io/LocationParseNode.java | 18 ++++--------------
 2 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/uk/ac/sanger/artemis/io/Location.java b/uk/ac/sanger/artemis/io/Location.java
index f7b4df21e..a65e81781 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 15ed80472..b9748398c 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 =
-- 
GitLab