Beispiel #1
0
 // FG: this function is used to call this class from outside the library
 public void useMzIdentMLToCSV(String mzid, String out, String option, boolean verbose) {
   isVerbose = verbose;
   MzIdentMLUnmarshaller mzIdentMLUnmarshaller = new MzIdentMLUnmarshaller(new File(mzid));
   MzIdentMLToCSV mzidToCsv = new MzIdentMLToCSV();
   mzidToCsv.unmarshaller = mzIdentMLUnmarshaller;
   mzidToCsv.init(out, option);
 }
Beispiel #2
0
  public static void main(String[] args) {
    MzIdentMLToCSV mzidToCsv = new MzIdentMLToCSV();

    // TODO - Undecided which if any command line arguments to include - minimally need to know
    // whether to export Peptides or PAGs
    if (args != null && args.length == 3) {
      mzidToCsv.unmarshaller = new MzIdentMLUnmarshaller(new File(args[0]));
      mzidToCsv.init(args[1], args[2]);

    } else {

      mzidToCsv.unmarshaller = new MzIdentMLUnmarshaller(new File(mzidToCsv.xmlFile));
      mzidToCsv.init("out.csv", "exportPSMs");
      // mzidToCsv.init("out.csv","exportProteinGroups");

      // System.out.println("Error - correct usage MzIdentMLToCSV inputFile.mzid outputFile.csv
      // [exportProteinGroups|exportPSMs|exportProteinsOnly]");
    }
  }