Package org.snpeff.util
Class IubString
- java.lang.Object
-
- org.snpeff.util.IubString
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.String>
,java.util.Iterator<java.lang.String>
public class IubString extends java.lang.Object implements java.lang.Iterable<java.lang.String>, java.util.Iterator<java.lang.String>
Find all bases combinations from a string containing IUB codes- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_IUB_BASES
-
Constructor Summary
Constructors Constructor Description IubString(java.lang.String str)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
countIUB(java.lang.String str)
How many IUB bases are in this string?static boolean
hasIUB(java.lang.String str)
Does the string have ANY IUB base?static boolean
hasIUBMax(java.lang.String str)
Does the string have at most 'MAX_IUB_BASES' IUB bases?boolean
hasNext()
static boolean
isUIB(char base)
java.util.Iterator<java.lang.String>
iterator()
static char[]
iub2bases(char alt)
Convert a single IUB code to the corresponding bases IUB codes: M=A/C, R=A/G, W=A/T, S=C/G, Y=C/T, K=G/T and N=A/C/G/Tjava.lang.String
next()
void
remove()
-
-
-
Field Detail
-
MAX_IUB_BASES
public static final int MAX_IUB_BASES
- See Also:
- Constant Field Values
-
-
Method Detail
-
countIUB
public static int countIUB(java.lang.String str)
How many IUB bases are in this string?
-
hasIUB
public static boolean hasIUB(java.lang.String str)
Does the string have ANY IUB base?
-
hasIUBMax
public static boolean hasIUBMax(java.lang.String str)
Does the string have at most 'MAX_IUB_BASES' IUB bases?
-
isUIB
public static boolean isUIB(char base)
-
iub2bases
public static char[] iub2bases(char alt)
Convert a single IUB code to the corresponding bases IUB codes: M=A/C, R=A/G, W=A/T, S=C/G, Y=C/T, K=G/T and N=A/C/G/T
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.String>
-
iterator
public java.util.Iterator<java.lang.String> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.String>
-
next
public java.lang.String next()
- Specified by:
next
in interfacejava.util.Iterator<java.lang.String>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.lang.String>
-
-