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 Details

  • 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>