import charite.christo.strap.extensions.*; import charite.christo.strap.extensions.SecondaryStructure_Jnet; import charite.christo.strap.extensions.SecondaryStructure_NNPREDICT; import charite.christo.strap.extensions.SecondaryStructure_Sopma; import charite.christo.strap.extensions.CoiledCoil_PredictorRobinson; import charite.christo.strap.extensions.TransmembraneHelix_Phobius; import charite.christo.strap.extensions.TransmembraneHelix_MEMSAT; /* ... There are many more int the package ... charite.christo.strap.extensions. */ import charite.christo.interfaces.SecondaryStructure_Predictor; import charite.christo.interfaces.TransmembraneHelix_Predictor; import charite.christo.interfaces.CoiledCoil_Predictor; import charite.christo.interfaces.PredictionFromAminoacidSequence; import charite.christo.Web; import charite.christo.CacheResult; /* java DemoPrediction Secondary structure elements like helices and beta sheets can be predicted from the primary structure. Three interfaces are derived from PredictionFromAminoacidSequence for secondary structures, coiled-coils and transmembrane helices. */ public class DemoPrediction { public static void main(String[] argv){ /* The cache is located in ~/.StrapAlign/cached/ */ CacheResult.setEnabled(true); /*Create an instance of SecondaryStructure_Predictor */ PredictionFromAminoacidSequence predictor=new SecondaryStructure_NNPREDICT(); /* Set the sequence. */ /* The setter allows also multiple sequences given as an array of Strings. */ /* This improves performance for web based methods and allows some methods to compute the consensus. */ predictor.setGappedSequences(new String[]{"MFLTRSEYDRGVNTFSPEGRLFQVEYAIEGHKLGSTAIGIQTSEGVCLAVEKRITSPLMEPSSIEKIVEIDAHIGCAMSGLIADAKTLIDKARVETQNHWFTYNETMTVESVTQAVSNLALQFGEEDADPGAMSRPFGVALLFGGVDEKGPQLFHMDPSGTFVQCDARAIGSASEGAQSSLQEVYHKSTTLKEAIKSSLIILKQVMEEKLNATNIELATVQPGQNFHMFTKEELEEVIKDMEILCEDNTSLSSIPNSLMQVDGDSGLYRNDFNSRDANSSDASNWTIDGENRTNLSFEGYLPPTCLSILHLQEKNWSALLTAVVIILTIAGNILVIMAVSLEKKLQNATNYFLMSLAIADMLLGFLVMPVSMLTILYGYRWPLPSKLCAVWIYLDVLFSTASIMHLCAISLDRYVAIQNPIHHSRFNSRTKAFLKIIAVWTISVGVSMPIPVFGLQDDSKVFKQGSCLLADDNFVLIGSFVAFFIPLTIMVITYFLTIKSLQKEATLCVSDLSTRAKLASFSFLPQSSLSSEKLFQRSIHREPGSYTGRRTMQSISNEQKACKVLGIVFFLFVVMWCPFFITNIMAVICKESCNEHVIGALLNVFVWIGYLSSAVNPLVYTLFNKTYRSAFSRYIQCQYKENRKPLQLILVNTIPALAYKSSQLQAGQNKDSKEDAEPTDNDCSMVTLGKQQSEETCTDNINTVNEKVSCVDKQKELDSKVRNVKDKVMCIEHEIKSLEDLQDEYDFKCKTLQNREHLLLKKMYLMLDNKRKEVVHKIIELLNVTELTQNALINDELVEWKRRQQSACIGGPPNACLDQQNWFTIVAESLQQVRQQLKKLEELEQKYTYEHDPITKNKQVLWDRTFSLFQQLIQSS"}); /* start computation */ predictor.compute(); /* get the result for the first and only sequence (index 0) */ char result[]=predictor.getPrediction()[0]; System.out.println(new String(result)); /* Save the Cache containing computed results */ CacheResult.save(); System.exit(0); } }