|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprocope.data.networks.NetworkWriter
public class NetworkWriter
Contains different methods to write ProteinNetwork
objects to files
or streams. Each line of the output contains one edge, a line looks as
follows:
protein1[s]protein2[s]score[s]annotationswhere [s] is the separator (TAB by default). If and edge has no score or no annotations that field is simply left empty. Annotations are stored as key/ value pairs in the form
key1=value1;key2=value2;...
.
XGMML
This class also contains an XGMML export function for protein networks. These files are compatible with Cytoscape for instance.
Field Summary | |
---|---|
static String |
DEFAULT_SEPARATOR
Default separator for the fields of each edge: TAB |
Method Summary | |
---|---|
static void |
writeNetwork(ProteinNetwork network,
File outfile)
Writes a network to a specified file. |
static void |
writeNetwork(ProteinNetwork network,
File outfile,
String separator)
Writes a network to a specified file. |
static void |
writeNetwork(ProteinNetwork network,
OutputStream outstream)
Writes a network to a specified outputstream. |
static void |
writeNetwork(ProteinNetwork network,
OutputStream outstream,
String separator)
Writes a network to a specified outputstream. |
static void |
writeNetwork(ProteinNetwork network,
String outfile)
Writes a network to a specified file. |
static void |
writeNetwork(ProteinNetwork network,
String outfile,
String separator)
Writes a network to a specified file. |
static void |
writeXGMML(ProteinNetwork network,
File outfile)
Creates a Cytoscape-compatible XGMML file. |
static void |
writeXGMML(ProteinNetwork network,
OutputStream outstream)
Creates a Cytoscape-compatible XGMML file, but writes to an output stream. |
static void |
writeXGMML(ProteinNetwork network,
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 |
---|
public static final String DEFAULT_SEPARATOR
Method Detail |
---|
public static void writeNetwork(ProteinNetwork network, String outfile) throws IOException
network
- the network to be writtenoutfile
- path to the output file
IOException
- if the file could not be writtenpublic static void writeNetwork(ProteinNetwork network, String outfile, String separator) throws IOException
network
- the network to be writtenoutfile
- path to the output fileseparator
- separator between the fields of each edge
IOException
- if the file could not be writtenpublic static void writeNetwork(ProteinNetwork network, File outfile) throws IOException
network
- the network to be writtenoutfile
- path to the output file
IOException
- if the file could not be writtenpublic static void writeNetwork(ProteinNetwork network, File outfile, String separator) throws IOException
network
- the network to be writtenoutfile
- path to the output fileseparator
- separator between the fields of each edge
IOException
- if the file could not be writtenpublic static void writeNetwork(ProteinNetwork network, OutputStream outstream)
network
- the network to be writtenoutstream
- the stream to which the network will be written
FileNotFoundException
- if the file could not be openedpublic static void writeNetwork(ProteinNetwork network, OutputStream outstream, String separator)
network
- the network to be writtenoutstream
- the stream to which the network will be writtenseparator
- separator between the fields of each edge
FileNotFoundException
- if the file could not be openedpublic static void writeXGMML(ProteinNetwork network, String outfile) throws IOException
weight
. All
other annotations are written out using their respective key.
network
- network to be stored as XGMMLoutfile
- path to output file
IOException
- if the file could not be writtenpublic static void writeXGMML(ProteinNetwork network, File outfile) throws IOException
weight
. All
other annotations are written out using their respective key.
network
- network to be stored as XGMMLoutfile
- path to output file
IOException
- if the file could not be writtenpublic static void writeXGMML(ProteinNetwork network, OutputStream outstream)
confidence
. All
other annotations are written out using their respective key.
network
- network to be stored as XGMMLoutstream
- to which the XGMML will be written to
FileNotFoundException
- if the output file could not be opened
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |