procope.data.complexes
Class ComplexSetWriter

java.lang.Object
  extended by procope.data.complexes.ComplexSetWriter

public class ComplexSetWriter
extends Object

This class contains static methods to write complex sets to files or streams. It is not instantiatable.

Complex sets are written out as one complex per line where the proteins of each complexes are seperated by a specified delimiter character (by default the TAB character).

Author:
Jan Krumsiek
See Also:
Complex, ComplexSet

Field Summary
static String DEFAULT_DELIMITER
          Default delimiter which seperates the proteins of a complex: TAB
 
Constructor Summary
ComplexSetWriter()
           
 
Method Summary
static void writeComplexes(ComplexSet set, File outfile)
          Writes a complex set to a specified file.
static void writeComplexes(ComplexSet set, File outfile, String delimiter)
          Writes a complex set to a specified file.
static void writeComplexes(ComplexSet set, OutputStream outstream)
          Writes a complex set to an OutputStream.
static void writeComplexes(ComplexSet set, OutputStream outstream, String delimiter)
          Writes a complex set to an OutputStream.
static void writeComplexes(ComplexSet set, String outfile)
          Writes a complex set to a specified file.
static void writeComplexes(ComplexSet set, String outfile, String delimiter)
          Writes a complex set to a specified file.
static void writeXGMML(ComplexSet set, ProteinNetwork net, File outfile)
          Creates a Cytoscape-compatible XGMML file.
static void writeXGMML(ComplexSet set, ProteinNetwork net, OutputStream outstream)
          Creates a Cytoscape-compatible XGMML file, but writes to an output stream.
static void writeXGMML(ComplexSet set, ProteinNetwork net, String outfile)
          Creates a Cytoscape-compatible XGMML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DELIMITER

public static final String DEFAULT_DELIMITER
Default delimiter which seperates the proteins of a complex: TAB

See Also:
Constant Field Values
Constructor Detail

ComplexSetWriter

public ComplexSetWriter()
Method Detail

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  String outfile)
                           throws IOException
Writes a complex set to a specified file.

Parameters:
set - the set to be written
outfile - path to the output file
Throws:
IOException - if the file could not be written

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  String outfile,
                                  String delimiter)
                           throws IOException
Writes a complex set to a specified file. Accepts a custom delimiter string for the separation of proteins of a complex.

Parameters:
set - the set to be written
outfile - path to the output file
delimiter - custom delimiter character
Throws:
IOException - if the file could not be written

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  File outfile)
                           throws IOException
Writes a complex set to a specified file.

Parameters:
set - the set to be written
outfile - path to the output file
Throws:
IOException - if the file could not be written

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  File outfile,
                                  String delimiter)
                           throws IOException
Writes a complex set to a specified file. Accepts a custom delimiter string for the separation of proteins of a complex.

Parameters:
set - the set to be written
outfile - path to the output file
delimiter - custom delimiter character
Throws:
IOException - if the file could not be written

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  OutputStream outstream)
Writes a complex set to an OutputStream.

Parameters:
set - the set to be written
outstream - output stream the complexes will be written to

writeComplexes

public static void writeComplexes(ComplexSet set,
                                  OutputStream outstream,
                                  String delimiter)
Writes a complex set to an OutputStream. Accepts a custom delimiter string for the separation of proteins of a complex.

Parameters:
set - the set to be written
outstream - output stream the complexes will be written to
delimiter - custom delimiter character

writeXGMML

public static void writeXGMML(ComplexSet set,
                              ProteinNetwork net,
                              String outfile)
                       throws IOException
Creates a Cytoscape-compatible XGMML file. Optionally, a network can be specified to annotate the inner-complex edges with given weights.

Parameters:
set - complex set to be stored as XGMML
net - network for edge weights, can be null
outfile - path to output file
Throws:
IOException - if the file could not be written

writeXGMML

public static void writeXGMML(ComplexSet set,
                              ProteinNetwork net,
                              File outfile)
                       throws IOException
Creates a Cytoscape-compatible XGMML file. Optionally, a network can be specified to annotate the inner-complex edges with given weights.

Parameters:
set - complex set to be stored as XGMML
net - network for edge weights, can be null
outfile - path to output file
Throws:
IOException - if the file could not be written

writeXGMML

public static void writeXGMML(ComplexSet set,
                              ProteinNetwork net,
                              OutputStream outstream)
Creates a Cytoscape-compatible XGMML file, but writes to an output stream. Optionally, a network can be specified to annotate the inner-complex edges with given weights.

Parameters:
set - complex set to be stored as XGMML
net - network for edge weights, can be null
outstream - outstream to which the XGMML will be written to
Throws:
FileNotFoundException - if the output file could not be opened