Package dsa

Class Genome

java.lang.Object
dsa.Genome

public class Genome extends Object
This library provides static methods for compressing and expanding a genomic sequence using a 2-bit code.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Reads from standard input a sequence characters over the alphabet { A, C, G, T }; compresses them using two bits per character; and writes the results to standard output.
    static void
    Reads from standard input a sequence of genome-compressed bits; expands each two bits into a character over the alphabet { A, C, G, T }; and writes the results to standard output.
    static void
    main(String[] args)
    Unit tests the library.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • compress

      public static void compress()
      Reads from standard input a sequence characters over the alphabet { A, C, G, T }; compresses them using two bits per character; and writes the results to standard output.
    • expand

      public static void expand()
      Reads from standard input a sequence of genome-compressed bits; expands each two bits into a character over the alphabet { A, C, G, T }; and writes the results to standard output.
    • main

      public static void main(String[] args)
      Unit tests the library.
      Parameters:
      args - the command-line arguments.