data.complexes
Class ComplexSetReader

java.lang.Object
  extended by data.complexes.ComplexSetReader

public class ComplexSetReader
extends Object

This class contains static methods to read complexes from files or streams. It is not instantiatable.

A complex set file contains one complex per line. Each complex consists of a list of proteins seperated by a separator character. Protein identifiers will be mapped to internal integer IDs (see also: ProteinManager)

Author:
Jan Krumsiek
See Also:
Complex, ComplexSet

Field Summary
static String DEFAULT_SEPARATOR
          Default separator which seperates the proteins of a complex: TAB
 
Method Summary
static ComplexSet readComplexes(File file)
          Reads complexes from a given file.
static ComplexSet readComplexes(File file, String organism)
          Reads complexes from a given file.
static ComplexSet readComplexes(File file, String organism, String separator)
          Reads complexes from a given file.
static ComplexSet readComplexes(InputStream input)
          Reads complexes from a given InputStream.
static ComplexSet readComplexes(InputStream input, String organism)
          Reads complexes from a given InputStream.
static ComplexSet readComplexes(InputStream input, String organism, String separator)
          Reads complexes from a given InputStream.
static ComplexSet readComplexes(String file)
          Reads complexes from a given file.
static ComplexSet readComplexes(String file, String organism)
          Reads complexes from a given file.
static ComplexSet readComplexes(String file, String organism, String separator)
          Reads complexes from a given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SEPARATOR

public static final String DEFAULT_SEPARATOR
Default separator which seperates the proteins of a complex: TAB

See Also:
Constant Field Values
Method Detail

readComplexes

public static ComplexSet readComplexes(String file)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file. Uses the default separator for proteins in a complex (the tab character)

Parameters:
file - path to the file which contains the complexes
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(String file,
                                       String organism)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file.

Parameters:
file - path to the file which contains the complexes
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(String file,
                                       String organism,
                                       String separator)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file.

Parameters:
file - path to the file which contains the complexes
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
separator - seperator character between proteins in a complex
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(File file)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file. Uses the default separator for proteins in a complex (the tab character)

Parameters:
file - path to the file which contains the complexes
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(File file,
                                       String organism)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file.

Parameters:
file - path to the file which contains the complexes
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(File file,
                                       String organism,
                                       String separator)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given file.

Parameters:
file - path to the file which contains the complexes
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
separator - seperator character between proteins in a complex
Returns:
complex set read from the file
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(InputStream input)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given InputStream.

Parameters:
input - input stream from which complex data will be read
Returns:
complex set read from the stream
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(InputStream input,
                                       String organism)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given InputStream.

Parameters:
input - input stream from which complex data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
complex set read from the stream
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed

readComplexes

public static ComplexSet readComplexes(InputStream input,
                                       String organism,
                                       String separator)
                                throws IOException,
                                       ProCopeException
Reads complexes from a given InputStream.

Parameters:
input - input stream from which complex data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
separator - seperator character between proteins in a complex
Returns:
complex set read from the stream
Throws:
IOException - on input/output errors
ProCopeException - if the file could not be parsed