Package org.snpeff.util

# Class IubString

java.lang.Object
org.snpeff.util.IubString

All Implemented Interfaces:
  `Iterable<String>`, `Iterator<String>`

public class IubString extends Object implements Iterable<String>, Iterator<String>
Find all bases combinations from a string containing IUB codes

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`MAX_IUB_BASES`

## Constructor Summary

Constructors
Constructor
Description
`IubString(String str)`

## Method Summary

Modifier and Type
Method
Description
`static int`
`countIUB(String str)`
How many IUB bases are in this string?
`static boolean`
`hasIUB(String str)`
Does the string have ANY IUB base?
`static boolean`
`hasIUBMax(String str)`
Does the string have at most 'MAX_IUB_BASES' IUB bases?
`boolean`
`hasNext()`
`static boolean`
`isUIB(char base)`
`Iterator<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/T
`String`
`next()`
`void`
`remove()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

## Field Details

### MAX_IUB_BASES

public static final int MAX_IUB_BASES

See Also:
  - Constant Field Values

## Constructor Details

### IubString

public IubString(String str)

## Method Details

### countIUB

public static int countIUB(String str)
How many IUB bases are in this string?

### hasIUB

public static boolean hasIUB(String str)
Does the string have ANY IUB base?

### hasIUBMax

public static boolean hasIUBMax(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 interface `Iterator<String>`

### iterator

public Iterator<String> iterator()

Specified by:
  `iterator` in interface `Iterable<String>`

### next

public String next()

Specified by:
  `next` in interface `Iterator<String>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<String>`