public void testReadMusiteXML() throws IOException { String xml = "testData/musite-test.xml"; String out = xml + ".gz"; ProteinsXMLReader reader = ProteinsXMLReader.createReader(); Proteins proteins = MusiteIOUtil.read(reader, xml); System.out.println(proteins.proteinCount()); ProteinsXMLWriter writer = ProteinsXMLWriter.createWriter(); MusiteIOUtil.write(writer, out, proteins); new File(out).delete(); }
public void testReadUniprotXML() throws IOException { String xml = "testData/uniprot-test.xml"; String out = xml + ".tmp"; UniProtXMLReader reader = new UniProtXMLReader(); reader.setPTMFilter(PTM.PHOSPHORYLATION); Proteins proteins = MusiteIOUtil.read(reader, xml); System.out.println(proteins.proteinCount()); ProteinsXMLWriter writer = ProteinsXMLWriter.createWriter(); MusiteIOUtil.write(writer, out, proteins); new File(out).delete(); }