Exemplo n.º 1
0
  public static void main(String[] args) throws IOException {

    Modification methylH = Modification.parseModification("CH2");
    Modification methylD = Modification.parseModification("CH[2]3H-1");

    PeakProcessorChain<PeakAnnotation> ppc = new PeakProcessorChain<>();

    SpectraPairExtractor mse = new SpectraPairExtractor(methylH, methylD);

    FilenameFilter filter = new SuffixFileFilter(".mgf", IOCase.INSENSITIVE);

    File specFile = new File(args[0]);

    if (specFile.isDirectory()) {

      File[] files = specFile.listFiles(filter);

      for (File aFile : files) {

        System.out.println("Processing File:" + aFile.getName());

        mse.process(aFile.getAbsolutePath(), ppc, 6);
      }

    } else {

      System.out.println("Processing File:" + specFile.getName());

      mse.process(specFile.getAbsolutePath(), ppc, 10);
    }
  }