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.
-
-
Constructor Summary
Constructors Constructor Description Genome()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.static void
main(String[] args)
Unit tests the library.
-
-
-
Method Detail
-
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.
-
-