/** * Prints out the XML representation of an AFPChain from a file containing exactly two FASTA sequences. * * @param args * A String array of fasta-file structure-1-name structure-2-name * @throws StructureException * @throws IOException */ public static void main(String[] args) throws StructureException, IOException { if (args.length != 3) { System.err.println("Usage: FastaAFPChainConverter fasta-file structure-1-name structure-2-name"); return; } File fasta = new File(args[0]); Structure structure1 = StructureTools.getStructure(args[1]); Structure structure2 = StructureTools.getStructure(args[2]); if (structure1 == null) throw new IllegalArgumentException("No structure for " + args[1] + " was found"); if (structure2 == null) throw new IllegalArgumentException("No structure for " + args[2] + " was found"); AFPChain afpChain = fastaFileToAfpChain(fasta, structure1, structure2); String xml = AFPChainXMLConverter.toXML(afpChain); System.out.println(xml); }