public class GeneFind
extends Object
Compilation: javac GeneFind.java
Execution: java GeneFind start stop < input.txt
To find a gene in a genome, we scan for the start codon,
remember its index, then scan from the next stop codon.
If the length of the intervening sequence is a multiple of 3,
we have found a gene.
% more genomeTiny.txt
ATAGATGCATAGCGCATAGCTAGATGTGCTAGCAT
% java GeneFind ATG TAG < genomeTiny.txt
CATAGCGCA
TGC
% java GeneFind ATG TAG < genomeVirus.txt
CGCCTGCGTCTGTAC
TCGAGCGGATCGCTCACAACCAGTCGG
AGATTATCAAAAAGGATCTTCACC