From fbfc668ab019f5a7a2b48d7844db22c3ddeec89a Mon Sep 17 00:00:00 2001
From: tcarver <tjc>
Date: Fri, 6 Jan 2012 16:11:37 +0000
Subject: [PATCH] optimise getNumAlleles()

---
 uk/ac/sanger/artemis/components/variant/VariantBase.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/uk/ac/sanger/artemis/components/variant/VariantBase.java b/uk/ac/sanger/artemis/components/variant/VariantBase.java
index 6519d4a9d..fae106f30 100644
--- a/uk/ac/sanger/artemis/components/variant/VariantBase.java
+++ b/uk/ac/sanger/artemis/components/variant/VariantBase.java
@@ -81,7 +81,8 @@ public class VariantBase
 
   protected int getNumAlleles()
   {
-    return COMMA_PATTERN.split(alt).length + 1;
+    return VCFRecord.countOccurrences(alt, ',')+2;
+    //return COMMA_PATTERN.split(alt).length + 1;
     //return alt.split(",").length + 1;
   }
 
-- 
GitLab