com.compomics.util.experiment
Class MsExperiment

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.MsExperiment
All Implemented Interfaces:
Serializable, Cloneable

public class MsExperiment
extends ExperimentObject

This class represents the experiment. Created by IntelliJ IDEA. User: Marc Date: Jun 18, 2010 Time: 8:55:09 AM

See Also:
Serialized Form

Constructor Summary
MsExperiment(String reference)
          Constructor for an experiment
MsExperiment(String reference, HashMap<Integer,Sample> samples)
          Constructor for an experiment
 
Method Summary
 void addAnalysisSet(Sample sample, SampleAnalysisSet analysisSet)
          Method to link an analysis set to an experiment
 SampleAnalysisSet getAnalysisSet(Sample sample)
          Returns the analysis set corresponding to a sample
 String getReference()
          returns the reference of the experiment
 Sample getSample(int id)
          Returns a single sample accessed by its index
 HashMap<Integer,Sample> getSamples()
          Returns the implemented samples
 void setReference(String reference)
          sets the reference of the experiment
 void setSample(int index, Sample sample)
          Set a new sample
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MsExperiment

public MsExperiment(String reference,
                    HashMap<Integer,Sample> samples)
Constructor for an experiment

Parameters:
reference - the reference of the experiment
samples - the samples analyzed

MsExperiment

public MsExperiment(String reference)
Constructor for an experiment

Parameters:
reference - the reference of the experiment
Method Detail

getReference

public String getReference()
returns the reference of the experiment

Returns:
reference of the experiment

setReference

public void setReference(String reference)
sets the reference of the experiment

Parameters:
reference - the experiment reference

addAnalysisSet

public void addAnalysisSet(Sample sample,
                           SampleAnalysisSet analysisSet)
Method to link an analysis set to an experiment

Parameters:
sample - the reference sample
analysisSet - the analysis set corresponding to this sample

getAnalysisSet

public SampleAnalysisSet getAnalysisSet(Sample sample)
Returns the analysis set corresponding to a sample

Parameters:
sample - the reference sample
Returns:
the analysis set corresponding to the reference sample

getSamples

public HashMap<Integer,Sample> getSamples()
Returns the implemented samples

Returns:
map containing all samples

getSample

public Sample getSample(int id)
Returns a single sample accessed by its index

Parameters:
id - the index of the desired sample
Returns:
the desired sample

setSample

public void setSample(int index,
                      Sample sample)
Set a new sample

Parameters:
index - the index of the sample
sample - the new sample


Copyright © 2012. All Rights Reserved.