/** * Converts a given entrySet into a Collection of BinaryInteractionImpl. <br/> If a ExpansionStrategy was set, every * interaction in the given entrySet will be expanded prior to conversion to MITAB25. Should the expansion result in * multiple interaction, they are converted iteratively. * * @param entrySet the entrySet to convert in MITAB25. * @return a non null collection of BinaryInteractionImpl. */ public Collection<BinaryInteraction> convert(EntrySet entrySet) throws TabConversionException { return convert(entrySet, false); }
Xml2Tab x2t = new Xml2Tab(); x2t.addOverrideSourceDatabase(new CrossReference("MI", "0469", "intact")); x2t.setExpansionStrategy(expansionStragegy); x2t.setPostProcessor(new ClusterInteractorPairProcessor()); } else { x2t.setPostProcessor(null); Collection<BinaryInteraction> interactions = x2t.convert(xmlFilesToConvert);
Xml2Tab x2t = new Xml2Tab(); x2t.setPostProcessor(new ClusterInteractorPairProcessor()); System.out.println("Applying Spoke model expansion wherever appropriate."); Collection<BinaryInteraction> interactions = x2t.convert(dir);
Xml2Tab x2t = new Xml2Tab(); x2t.setPostProcessor(postProcessorStrategy); Collection<BinaryInteraction> interactions = x2t.convert(inputFiles); fileWriter.write(interactions, outputWriter); singleFile.add(inputFile); Collection<BinaryInteraction> interactions = x2t.convert(singleFile); fileWriter.write(interactions, outputWriter);
/** * Convert a collection of files into a collection of PSIMITAB BinaryInteractionImpl. * * @param inputFiles Collection of files to convert. * @return a non null collection of PSIMITAB BinaryInteractionImpl. * @throws TabConversionException if an error occur during the processing. */ public Collection<BinaryInteraction> convert(Collection<File> inputFiles) throws TabConversionException { return convert(inputFiles, false); }
/** * Convert a file into a collection of PSIMITAB BinaryInteractionImpl. Post processing will be applied if requested. * * @param file the file to convert. * @return a non null collection of PSIMITAB BinaryInteractionImpl. * @throws TabConversionException if an error occur during the processing. */ public Collection<BinaryInteraction> convert(File file) throws TabConversionException { return convert(file, false); }
/** * Convert a collection of files into a collection of PSIMITAB BinaryInteractionImpl. The postprocessing can be * enabled/disabled by using the skipPostProcessing variable. The postprocessing can be enabled/disabled by using * the skipPostProcessing variable. * * @param inputFiles Collection of files to convert. * @return a non null collection of PSIMITAB BinaryInteractionImpl. * @throws TabConversionException if an error occur during the processing. */ public Collection<BinaryInteraction> convert(Collection<File> inputFiles, boolean skipPostProcessing) throws TabConversionException { Collection<BinaryInteraction> interactions = new ArrayList<BinaryInteraction>(128); for (File file : inputFiles) { interactions.addAll(convert(file)); } // if ( false == skipPostProcessing ) { // interactions = doPostProcessing( interactions ); // } return interactions; }