|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprocope.data.networks.NetworkReader
public class NetworkReader
Contains various static methods to read networks
from
files and streams.
Check out NetworkWriter
to get further information about the
format in which network edges will be stored.
This class is not instantiatable.
Method Summary | |
---|---|
static ProteinNetwork |
readNetwork(File file)
Reads an undirected network from a given file. |
static ProteinNetwork |
readNetwork(File file,
boolean directed)
Reads a network from a given file. |
static ProteinNetwork |
readNetwork(InputStream input)
Reads an undirected network from a given InputStream . |
static ProteinNetwork |
readNetwork(InputStream input,
boolean directed)
Reads a network from a given InputStream . |
static ProteinNetwork |
readNetwork(String file)
Reads an undirected network from a given file. |
static ProteinNetwork |
readNetwork(String file,
boolean directed)
Reads a network from a given file. |
static void |
setSeparator(String newSeparator)
Set the separator used to divide protein identifiers, scores and eventual annotations in each line of the network data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setSeparator(String newSeparator)
Be careful to use any separators besides the whitespace and TAB character as parsing problems might occur.
newSeparator
- new separatorpublic static ProteinNetwork readNetwork(String file) throws IOException
file
- file to read network from
IOException
- if the file can not be writtenpublic static ProteinNetwork readNetwork(String file, boolean directed) throws IOException
file
- file to read network fromdirected
- flag which sets if the network should be directed, if
true
the first protein in each entry will be the
edge's source and the second protein will be the target
IOException
- if the file can not be writtenpublic static ProteinNetwork readNetwork(File file) throws IOException
file
- file to read network from
IOException
- if the file can not be writtenpublic static ProteinNetwork readNetwork(File file, boolean directed) throws IOException
file
- file to read network fromdirected
- flag which sets if the network should be directed, if
true
the first protein in each entry will be the
edge's source and the second protein will be the target
IOException
- if the file can not be writtenpublic static ProteinNetwork readNetwork(InputStream input)
InputStream
.
input
- input stream from which the network will be read
public static ProteinNetwork readNetwork(InputStream input, boolean directed)
InputStream
.
input
- input stream from which the network will be readdirected
- flag which sets if the network should be directed, if
true
the first protein in each entry will be the
edge's source and the second protein will be the target
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |