data.purifications
Class PurificationDataReader

java.lang.Object
  extended by data.purifications.PurificationDataReader

public class PurificationDataReader
extends Object

Contains static methods to read purification data from a file. Each line of the input data contains one bait-prey interaction. The following tab-separated fields are assumed (adapted from the purification data provided by The Krogan Lab Interactome Database):

  1. purification name
  2. identification
  3. day
  4. number
  5. bait
  6. prey
  7. score

Currently this reader only uses the purification name, bait and prey information. All bait-prey interactions with the same purification name (which of course should also all have the same bait) will be combined into one PurificationExperiment.

Multiple preys

Multiple occurences of preys in the same experiment (e.g. due to different mass spectrometry methods) can be counted multiple times or just once. All methods provide signatures which allow the setting of a multiplePreys flag.

Author:
Jan Krumsiek

Constructor Summary
PurificationDataReader()
           
 
Method Summary
static PurificationData readPurifications(File file)
          Read purification data from a given file.
static PurificationData readPurifications(File file, String organism)
          Read purification data from a given file.
static PurificationData readPurifications(File file, String organism, boolean multiplyPreys)
          Read purification data from a given file.
static PurificationData readPurifications(InputStream input)
          Read purification data from a given input stream.
static PurificationData readPurifications(InputStream input, String organism)
          Read purification data from a given input stream.
static PurificationData readPurifications(InputStream input, String organism, boolean multiplePreys)
          Read purification data from a given input stream.
static PurificationData readPurifications(String file)
          Read purification data from a given file.
static PurificationData readPurifications(String file, String organism)
          Read purification data from a given file.
static PurificationData readPurifications(String file, String organism, boolean multiplyPreys)
          Read purification data from a given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurificationDataReader

public PurificationDataReader()
Method Detail

readPurifications

public static PurificationData readPurifications(String file)
                                          throws IOException
Read purification data from a given file. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
file - file from which the purification data will be read
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(String file,
                                                 String organism)
                                          throws IOException
Read purification data from a given file. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
file - file from which the purification data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(String file,
                                                 String organism,
                                                 boolean multiplyPreys)
                                          throws IOException
Read purification data from a given file.

Parameters:
file - file from which the purification data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
multiplyPreys - true: count multiple preys, see above
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(File file)
                                          throws IOException
Read purification data from a given file. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
file - file from which the purification data will be read
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(File file,
                                                 String organism)
                                          throws IOException
Read purification data from a given file. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
file - file from which the purification data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(File file,
                                                 String organism,
                                                 boolean multiplyPreys)
                                          throws IOException
Read purification data from a given file.

Parameters:
file - file from which the purification data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
multiplyPreys - true: count multiple preys, see above
Returns:
purification data read from the file
Throws:
IOException - if the file could not be read

readPurifications

public static PurificationData readPurifications(InputStream input)
Read purification data from a given input stream. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
input - inputstream from which the data will be read
Returns:
purification data read from the stream

readPurifications

public static PurificationData readPurifications(InputStream input,
                                                 String organism)
Read purification data from a given input stream. Multiple occurences of preys will be counted multiple times (see above).

Parameters:
input - inputstream from which the data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
Returns:
purification data read from the stream

readPurifications

public static PurificationData readPurifications(InputStream input,
                                                 String organism,
                                                 boolean multiplePreys)
Read purification data from a given input stream.

Parameters:
input - inputstream from which the data will be read
organism - specify an organism identifier for the new proteins or null for no organism (see also: ProteinManager)
multiplePreys - true: count multiple preys, see above
Returns:
purification data read from the stream