data.purifications
Class PurificationData

java.lang.Object
  extended by data.purifications.PurificationData
All Implemented Interfaces:
ProteinSet, Iterable<PurificationExperiment>

public class PurificationData
extends Object
implements ProteinSet, Iterable<PurificationExperiment>

A set of protein purification experiments where each experiment constists of a bait protein along with a list of prey proteins it purified.

The score calculation methods in this library are based on such collections of purification experiments and require a PurificationData object as an input.

This class is a simple container method with basic accession and some data manipulation methods.

Author:
Jan Krumsiek
See Also:
PurificationExperiment, PurificationDataReader, SocioAffinityCalculator, PECalculator, HartCalculator, Bootstrap

Constructor Summary
PurificationData()
          Creates an empty purification dataset
 
Method Summary
 void addExperiment(PurificationExperiment experiment)
          Adds a specified experiment to the dataset.
 void addExperiments(Collection<PurificationExperiment> experiments)
          Adds a list of purification experiments to the dataset
 ProteinNetwork getBaitPreyInteractions()
          Calculates a directed network containing all bait-prey interactions.
 List<PurificationExperiment> getExperiments()
          Returns the list of PurificationExperiment objects backing this dataset.
 int getNumberOfExperiments()
          Returns the number of experiments contained in this dataset
 int getPreyCount()
          Returns the total number of preys in this dataset.
 Set<Integer> getProteins()
          Returns the set of proteins which are contained in this purification data set
 Iterator<PurificationExperiment> iterator()
          Returns an iterator over all purification experiments in this dataset.
 PurificationData merge(PurificationData mergeWith)
          Merges two purification datasets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurificationData

public PurificationData()
Creates an empty purification dataset

Method Detail

getExperiments

public List<PurificationExperiment> getExperiments()
Returns the list of PurificationExperiment objects backing this dataset. Note: This returns the original list, changes will also alter the PurificationData object.

Returns:
list of purifcation experiments in this dataset

addExperiment

public void addExperiment(PurificationExperiment experiment)
Adds a specified experiment to the dataset.

Parameters:
experiment - the experiment to be added

addExperiments

public void addExperiments(Collection<PurificationExperiment> experiments)
Adds a list of purification experiments to the dataset

Parameters:
experiments - list of experiments to be added

getNumberOfExperiments

public int getNumberOfExperiments()
Returns the number of experiments contained in this dataset

Returns:
number of experiments in the dataset

getBaitPreyInteractions

public ProteinNetwork getBaitPreyInteractions()
Calculates a directed network containing all bait-prey interactions. That means that for each bait this network will contain one directed edge to each of its preys. The networks edges get a standard weight of 1.0.

Returns:
directed network containing all bait-prey interactions

getProteins

public Set<Integer> getProteins()
Returns the set of proteins which are contained in this purification data set

Specified by:
getProteins in interface ProteinSet
Returns:
a set of internal IDs

getPreyCount

public int getPreyCount()
Returns the total number of preys in this dataset. That is, this number represents the total number of bait-prey interactions in the set.

Returns:
total number of preys in the dataset

iterator

public Iterator<PurificationExperiment> iterator()
Returns an iterator over all purification experiments in this dataset.

Specified by:
iterator in interface Iterable<PurificationExperiment>

merge

public PurificationData merge(PurificationData mergeWith)
Merges two purification datasets. This is achieved by simple merging the list of purification experiments. Duplicates are not handled.

Parameters:
mergeWith - other purification data set this one will be merged with
Returns:
a new PurificationData object containing the purification experiments of both source datasets