public BinaryClusterScore(){ writer = new PsimiTabWriter(PsimiTabVersion.v2_5); }
public void write(Collection<BinaryInteraction> interactions, Writer writer) throws IOException { for (BinaryInteraction interaction : interactions) { write(interaction, writer); } }
public void writeMitabHeader(OutputStream os) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(os)); writeMitabHeader(bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
@Override public void saveResultsInMitab(String fileName) throws IOException { PsimiTabWriter writer = new PsimiTabWriter(); File file = new File(fileName); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file)); try{ Map<Integer, EncoreInteraction> interactionMapping = getInteractionMapping(); Encore2Binary iConverter = new Encore2Binary(getMappingIdDbNames()); for(Integer mappingId:interactionMapping.keySet()){ EncoreInteraction eI = interactionMapping.get(mappingId); BinaryInteraction bI = iConverter.getBinaryInteractionForScoring(eI); writer.write(bI, bufferedWriter); } } finally { bufferedWriter.close(); } }
/** * Save clustered results including scores in mitab files * @param interactionClusterScore */ private void saveMitabOutputFile(InteractionClusterScore interactionClusterScore) throws IOException, PsimiTabException { /* Retrieve results */ Map<Integer, EncoreInteraction> interactionMapping = interactionClusterScore.getInteractionMapping(); PsimiTabWriter writer = new PsimiTabWriter(PsimiTabVersion.v2_5); BufferedWriter outputWriter = new BufferedWriter(new FileWriter(mitabOutputFile)); try{ if (header){ writer.writeMitabHeader(outputWriter); } Encore2Binary iConverter = new Encore2Binary(interactionClusterScore.getMappingIdDbNames()); for(Integer mappingId:interactionMapping.keySet()){ EncoreInteraction eI = interactionMapping.get(mappingId); BinaryInteraction bI = iConverter.getBinaryInteractionForScoring(eI); writer.write(bI, outputWriter); } } finally { outputWriter.close(); } }
public void saveScoreInMitab(String fileName) throws IOException { PsimiTabWriter writer = new PsimiTabWriter(); File file = new File(fileName); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file)); try{ Map<Integer, EncoreInteraction> interactionMapping = getInteractionMapping(); Encore2Binary iConverter = new Encore2Binary(getMappingIdDbNames()); for(Integer mappingId:interactionMapping.keySet()){ EncoreInteraction eI = interactionMapping.get(mappingId); BinaryInteraction bI = iConverter.getBinaryInteraction(eI); writer.write(bI, bufferedWriter); } } finally { bufferedWriter.close(); } }
PsimiTabWriter writer = new PsimiTabWriter(); FileWriter fileWriter = new FileWriter(output); writer.writeMitabHeader(fileWriter); writer.write(allClustered, fileWriter); } else { System.out.println("No interaction to merge.");
@Override public void saveResultsInMitab(String fileName) throws IOException { PsimiTabWriter writer = new PsimiTabWriter(); File file = new File(fileName); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file)); try{ Map<Integer, EncoreInteraction> interactionMapping = getInteractionMapping(); Encore2Binary iConverter = new Encore2Binary(getMappingIdDbNames()); for(Integer mappingId:interactionMapping.keySet()){ EncoreInteraction eI = interactionMapping.get(mappingId); BinaryInteraction bI = iConverter.getBinaryInteraction(eI); writer.write(bI, bufferedWriter); } } finally { bufferedWriter.close(); } }
public void write(Collection<BinaryInteraction> interactions, OutputStream os) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(os)); write(interactions, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
PsimiTabWriter writer = new psidev.psi.mi.tab.PsimiTabWriter(); writer.write(interactions, new File("C:\\psimitab.csv"));
public void writeMitabHeader(File file) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new FileWriter(file, true)); writeMitabHeader(bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
PsimiTabWriter writer = new PsimiTabWriter(); writer.write(interactions, outputFile);
public void write(Collection<BinaryInteraction> interactions, PrintStream ps) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(ps)); write(interactions, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
public IntActClusterScore(){ super(); setMappingIdDbNames("uniprotkb,intact"); writer = new PsimiTabWriter(PsimiTabVersion.v2_5); // we want direct interaction = 5 setDirectInteractionWeight_5(); // we want method weights with PCA = 1.5 //initializeMethodWeights_PCA_1_5(); initializeMethodWeights(); setPublicationWeight(0.0f); this.miscore = new UnNormalizedMIScore(); }
public void writeMitabHeader(PrintStream ps) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(ps)); writeMitabHeader(bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
PsimiTabWriter fileWriter = new PsimiTabWriter(); fileWriter.write(interactions, outputWriter); fileWriter.write(interactions, outputWriter);
public void write(BinaryInteraction interaction, OutputStream os) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(os)); write(interaction, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
public void write(BinaryInteraction interaction, PrintStream ps) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new OutputStreamWriter(ps)); write(interaction, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
public void write(BinaryInteraction interaction, File file) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new FileWriter(file, true)); write(interaction, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }
public void write(Collection<BinaryInteraction> interactions, File file) throws IOException { BufferedWriter bufferedWriter = null; try { bufferedWriter = new BufferedWriter(new BufferedWriter(new FileWriter(file, true))); write(interactions, bufferedWriter); } finally { // You only need to close the outermost stream class because the close() // call is automatically trickled through all the chained classes if (bufferedWriter != null) { bufferedWriter.close(); } } }