Class BooleanGlassGeneIm

java.lang.Object
edu.cmu.tetrad.study.gene.tetradapp.model.BooleanGlassGeneIm
All Implemented Interfaces:
SessionModel, TetradSerializable, Serializable

public class BooleanGlassGeneIm extends Object implements SessionModel
Wraps the MeasurementSimulator class as an instantiated model.
Author:
josephramsey
See Also:
  • Constructor Details

    • BooleanGlassGeneIm

      public BooleanGlassGeneIm(BooleanGlassGenePm genePm, Parameters parameters)
      Obtains a boolean Glass function from the boolean Glass gene PM provided and uses it to create a Glass history and a measurement simulator. Editing this IM consists in editing the wrapped measurement simulator.
      Parameters:
      genePm - the BooleanGlassGenePm from which the BooleanGlassFunction is extracted.
  • Method Details

    • serializableInstance

      public static BooleanGlassGeneIm serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • getFactors

      public List<String> getFactors()
      Returns the list of factors in the history.
    • getParents

      public List<String> getParents(int factor)
      Returns the list of parents of the given factor as String's formatted in the style used by the Tetrad IV display-- e.g. "V1:L2" for factor "V1" at a lag of 2.
      Parameters:
      factor - the factor, e.g. "V3", for which parents are requested.
      Returns:
      the list of lagged factors which are parents of 'factor'.
    • getSimulationParams

      public Object getSimulationParams()
      Returns the MeasurementSimulator. The simulation parameters can be edited directly with this. (Needs to be cast to MeasurementSimulator.)
    • getNumParents

      public int getNumParents(int factor)
      Returns the number of parents that a given factor has.
      Parameters:
      factor - the given factor, e.g. "V3", formatted as a String name.
    • getRowValueAt

      public boolean getRowValueAt(int factor, int row)
      Returns the value in the given row of the boolean table for the given factor.
      Returns:
      true or false.
    • setRowValueAt

      public void setRowValueAt(int factor, int row, boolean value)
      Sets the value in the given row of the boolean table for the given factor to the given value (true/false).
    • setSimulator

      public void setSimulator(MeasurementSimulatorParams simulator)
    • simulateData

      public DataModelList simulateData()
      Uses the MeasurementSimulator class to simulate a set of measurement data and optionally a set of raw cell expression data. For details of the measurement simulator, see that class.
      Returns:
      a DataModelList containing either one or two models, depending on whether measurement data alone is saved or whether raw data is additionally saved.
    • getBooleanGlassFunction

      public BooleanGlassFunction getBooleanGlassFunction()
      Returns the Glass function case to BooleanGlassFunction for convenience.
    • getHistory

      public GeneHistory getHistory()
      Returns the Glass history case to GlassHistory for convenience.
    • setErrorDistribution

      public void setErrorDistribution(int factor, Distribution distribution)
      Sets the error distribution for the given factor to the given distribution. Values for the transcription error for this factor will be drawn from this distribution.
    • getErrorDistribution

      public Distribution getErrorDistribution(int factor)
      Returns the error distribution for the given factor.
      See Also:
    • getName

      public String getName()
      Specified by:
      getName in interface SessionModel
      Returns:
      the name of the session model.
    • setName

      public void setName(String name)
      Description copied from interface: SessionModel
      Sets the name of the session model.
      Specified by:
      setName in interface SessionModel