procope.methods.scores.bootstrap
Class BootstrapMCLClusterings

java.lang.Object
  extended by procope.methods.scores.bootstrap.BootstrapMCLClusterings
All Implemented Interfaces:
Iterable<BootstrapMCLClustering>

public class BootstrapMCLClusterings
extends Object
implements Iterable<BootstrapMCLClustering>

Container for bootstrap MCL clustering lists. Contains methods to write and load these clustering collections to and from the file system.

This class belongs to the helper classes needed for parallelizable bootstrap scores calculation.

Author:
Jan Krumsiek

Constructor Summary
BootstrapMCLClusterings(ArrayList<BootstrapMCLClustering> clusterings)
          Initialize clustering collection with a given list of clusterings.
BootstrapMCLClusterings(String file)
          Reads a clustering collection from a given file.
BootstrapMCLClusterings(String file, boolean noRealClusterings)
          Reads a clustering collection from a given file.
 
Method Summary
 List<BootstrapMCLClustering> getClusterings()
          Returns the list of clusterings contained in this collection.
 Iterator<BootstrapMCLClustering> iterator()
          Returns an iterator of the clusterings
 void writeToFile(String outfile)
          Writes this clustering collection to a given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapMCLClusterings

public BootstrapMCLClusterings(ArrayList<BootstrapMCLClustering> clusterings)
Initialize clustering collection with a given list of clusterings.

Parameters:
clusterings - clusterings for this collection

BootstrapMCLClusterings

public BootstrapMCLClusterings(String file)
                        throws IOException
Reads a clustering collection from a given file.

Parameters:
file - file from which the clusterings will be read
Throws:
IOException - if the file could not be read
ProCopeException - if the file format is invalid

BootstrapMCLClusterings

public BootstrapMCLClusterings(String file,
                               boolean noRealClusterings)
                        throws IOException
Reads a clustering collection from a given file.

Parameters:
file - file from which the clusterings will be read
noRealClusterings - if true then only the efficiencies and inflation coefficients but no actual clusterings will be loaded from the file
Throws:
IOException - if the file could not be read
ProCopeException - if the file format is invalid
Method Detail

getClusterings

public List<BootstrapMCLClustering> getClusterings()
Returns the list of clusterings contained in this collection.

Returns:
list of clusterings

iterator

public Iterator<BootstrapMCLClustering> iterator()
Returns an iterator of the clusterings

Specified by:
iterator in interface Iterable<BootstrapMCLClustering>

writeToFile

public void writeToFile(String outfile)
                 throws IOException
Writes this clustering collection to a given file.

Parameters:
outfile - path of the file the clusterings will be written to
Throws:
IOException - if the file could not be written
See Also:
BootstrapMCLClusterings(String)