Skip to content
Snippets Groups Projects
Commit 4613a682 authored by tjc's avatar tjc
Browse files

tidy & fix

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@3820 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 5ccb08d4
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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; package uk.ac.sanger.artemis.io;
...@@ -34,7 +34,7 @@ import uk.ac.sanger.artemis.io.LocationLexer.TokenEnumeration; ...@@ -34,7 +34,7 @@ import uk.ac.sanger.artemis.io.LocationLexer.TokenEnumeration;
* functions for parsing and manipulating the location. * functions for parsing and manipulating the location.
* *
* @author Kim Rutherford * @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 public class Location
...@@ -375,13 +375,7 @@ public class Location ...@@ -375,13 +375,7 @@ public class Location
**/ **/
public Location reverseComplement(final int sequence_length) public Location reverseComplement(final int sequence_length)
{ {
final Location new_location = new Location(getParsedLocation().copy()); return reverseComplement(sequence_length, 1);
new_location.parse_tree =
new_location.getParsedLocation().reverseComplement(sequence_length);
new_location.parse_tree = new_location.parse_tree.getCanonical();
return new_location;
} }
/** /**
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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; package uk.ac.sanger.artemis.io;
...@@ -33,7 +33,7 @@ import uk.ac.sanger.artemis.util.OutOfRangeException; ...@@ -33,7 +33,7 @@ import uk.ac.sanger.artemis.util.OutOfRangeException;
* Location. It is a utility class for EMBL.Location. * Location. It is a utility class for EMBL.Location.
* *
* @author Kim Rutherford * @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 ...@@ -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. * Return a reversed and complemented copy of this Location.
* @param sequence_length The length of the sequence that this Location is * @param sequence_length The length of the sequence that this Location is
...@@ -432,7 +421,8 @@ class LocationParseNode extends EMBLObject ...@@ -432,7 +421,8 @@ class LocationParseNode extends EMBLObject
// System.out.println("LocationParseNode.reverseComplement() HERE "+ // System.out.println("LocationParseNode.reverseComplement() HERE "+
// start+ ".."+ end +" sequence_length="+sequence_length+ // start+ ".."+ end +" sequence_length="+sequence_length+
// " range.getEnd()="+range.getEnd()+ " range.getStart()="+range.getStart()+ // " 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 Range new_range = new Range(start, end);
final LocationParseNode new_range_node = final LocationParseNode new_range_node =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment