コード例 #1
0
ファイル: TestXML.java プロジェクト: yyftfh/musite
  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();
  }
コード例 #2
0
ファイル: TestXML.java プロジェクト: yyftfh/musite
  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();
  }