import charite.christo.strap.*;
import static java.lang.System.*;
/*
  java  DemoProtein_nucleotides
  This demo shows how protein objects are created from nucleotides.
  The amino acid sequence is translated from a nucleotide sequence.
  The nucleotide sequence may be the forward or the reverse complement strand.
  Genomic sequences contain translated and untranslated regions such as
  introns, 3'UTRs and 5'UTRs.
  The translated nucleotide indices are true-values in  a boolean array.
*/
public class DemoProtein_nucleotides {
    public static void main(String argv[]) {
        final StrapProtein p= new StrapProtein();
        /* Initialize a protein instance with a nucleotide sequence and specify the direction of translation */
        p.setNucleotides("CCCACCCCACTT",StrapProtein.FORWARD); 
        out.println("The NT sequence is "+p.getNucleotidesCurrentStrandAsString());
        out.println("The AA sequence is "+p.getResidueTypeAsString());
        out.println();
        /* try reverse complement */
        out.println("translate reverse complement");
        p.setNucleotides("CCCACCCCACTT",StrapProtein.REVERSE_COMPLEMENT); 
        out.println("The NT sequence is "+p.getNucleotidesCurrentStrandAsString());
        out.println("The AA sequence is "+p.getResidueTypeAsString());
        out.println();
        /* Now coding and non-coding regions come into play */
        out.println("Only base 4,5 and 6 is coding for amino acids. The remaining NTs are non-coding ");
        p.setNucleotidesCurrentStrandTranslated(new boolean[]{false,false,false,true,true,true});
        out.println("The NT sequence is "+p.getNucleotidesCurrentStrandAsString());
        out.println("The AA sequence is "+p.getResidueTypeAsString());
        exit(0);
    }
}