Class BooleanGlassGeneIm
java.lang.Object
edu.cmu.tetrad.study.gene.tetradapp.model.BooleanGlassGeneIm
- All Implemented Interfaces:
SessionModel
,TetradSerializable
,Serializable
Wraps the MeasurementSimulator class as an instantiated model.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBooleanGlassGeneIm
(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. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Glass function case to BooleanGlassFunction for convenience.getErrorDistribution
(int factor) Returns the error distribution for the given factor.Returns the list of factors in the history.Returns the Glass history case to GlassHistory for convenience.getName()
int
getNumParents
(int factor) Returns the number of parents that a given factor has.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.boolean
getRowValueAt
(int factor, int row) Returns the value in the given row of the boolean table for the given factor.Returns the MeasurementSimulator.static BooleanGlassGeneIm
Generates a simple exemplar of this class to test serialization.void
setErrorDistribution
(int factor, Distribution distribution) Sets the error distribution for the given factor to the given distribution.void
Sets the name of the session model.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).void
setSimulator
(MeasurementSimulatorParams simulator) Uses the MeasurementSimulator class to simulate a set of measurement data and optionally a set of raw cell expression data.
-
Constructor Details
-
BooleanGlassGeneIm
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
Generates a simple exemplar of this class to test serialization. -
getFactors
Returns the list of factors in the history. -
getParents
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
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
-
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
Returns the Glass function case to BooleanGlassFunction for convenience. -
getHistory
Returns the Glass history case to GlassHistory for convenience. -
setErrorDistribution
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
Returns the error distribution for the given factor. -
getName
- Specified by:
getName
in interfaceSessionModel
- Returns:
- the name of the session model.
-
setName
Description copied from interface:SessionModel
Sets the name of the session model.- Specified by:
setName
in interfaceSessionModel
-