Skip to content
Snippets Groups Projects
Commit edeac26a authored by tcarver's avatar tcarver
Browse files

speed up

parent 2b6e3ccc
Branches
Tags
No related merge requests found
package uk.ac.sanger.artemis.components.variant; package uk.ac.sanger.artemis.components.variant;
import java.util.regex.Pattern;
public class VariantBase public class VariantBase
{ {
private VCFRecord record; private VCFRecord record;
private String alt; private String alt;
protected static Pattern COMMA_PATTERN = Pattern.compile(",");
public VariantBase(VCFRecord record, String alt) public VariantBase(VCFRecord record, String alt)
{ {
...@@ -76,7 +79,8 @@ public class VariantBase ...@@ -76,7 +79,8 @@ public class VariantBase
protected int getNumAlleles() protected int getNumAlleles()
{ {
return alt.split(",").length + 1; return COMMA_PATTERN.split(alt).length + 1;
//return alt.split(",").length + 1;
} }
protected int getNumberOfIndels(boolean vcf_v4) protected int getNumberOfIndels(boolean vcf_v4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment