gatk-3.8/java/src/org/broadinstitute/sting/utils/BaseUtils.java

32 lines
686 B
Java
Raw Normal View History

package org.broadinstitute.sting.utils;
public class BaseUtils {
static public int simpleBaseToBaseIndex(char base) {
switch (base) {
case 'A':
case 'a': return 0;
case 'C':
case 'c': return 1;
case 'G':
case 'g': return 2;
case 'T':
case 't': return 3;
default: return -1;
}
}
static public char baseIndexToSimpleBase(int baseIndex) {
switch (baseIndex) {
case 0: return 'A';
case 1: return 'C';
case 2: return 'G';
case 3: return 'T';
default: return '.';
}
}
}