From 144b424933afe29187c0d0617be5bf6bc0d926b3 Mon Sep 17 00:00:00 2001 From: asivache Date: Wed, 12 Aug 2009 20:16:22 +0000 Subject: [PATCH] Added : String reverse(String s) - reverses a string git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1416 348d0f76-0448-11de-a6fe-93d51630548a --- java/src/org/broadinstitute/sting/utils/BaseUtils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/java/src/org/broadinstitute/sting/utils/BaseUtils.java b/java/src/org/broadinstitute/sting/utils/BaseUtils.java index cfc475031..beb8d5062 100644 --- a/java/src/org/broadinstitute/sting/utils/BaseUtils.java +++ b/java/src/org/broadinstitute/sting/utils/BaseUtils.java @@ -253,6 +253,16 @@ public class BaseUtils { return rcbases; } + /** + * Reverse (NOT reverse-complement!!) a string + * + * @param bases input string + * @return the reversed string + */ + static public String reverse(String bases) { + return new String( reverse( bases.getBytes() )) ; + } + /** * For the most frequent base in the sequence, return the percentage of the read it constitutes. *