import charite.christo.strap.StrapProtein; import charite.christo.strap.interfaces.AlignmentWriter; import charite.christo.strap.ExportAlignment; /* java DemoAlignmentWriter The class ExportAlignment is an implementations of the interface AlignmentWriter. The alignment consists of proteins p0 and p1. Both proteins have a gapped sequence and a name which are used to produce an output in MSF-format. */ public class DemoAlignmentWriter { public static void main(String[] argv){ /* Prepare proteins */ final StrapProtein p0=new StrapProtein(); final StrapProtein p1=new StrapProtein(); p0.setGappedSequence("ASDFGHKL"); p1.setGappedSequence("AS FGHKL"); p0.setName("protein0"); p1.setName("protein1"); /* create an instance of AlignmentWriter */ final AlignmentWriter alignmentWriter=new ExportAlignment(); /* Set the proteins of the alignment */ alignmentWriter.setProteins(p0,p1); final StringBuffer sb=new StringBuffer(); /* obtain the MSF-text */ final long options=AlignmentWriter.MSF; alignmentWriter.getText(options,sb); System.out.println(sb); System.exit(0); } }