de.jstacs.parameters
Interface GalaxyConvertible

All Known Implementing Classes:
AbsoluteValueCondition.AbsoluteValueConditionParameterSet, AbstractBurnInTestParameterSet, AbstractNumericalTwoClassPerformanceMeasure, AbstractPerformanceMeasure, AbstractPerformanceMeasureParameterSet, AbstractSelectionParameter, AbstractTerminationCondition.AbstractTerminationConditionParameterSet, AbstractTwoClassPerformanceMeasure, Alphabet.AlphabetParameterSet, AlphabetContainer.AbstractAlphabetContainerParameterSet, AlphabetContainerParameterSet, AlphabetContainerParameterSet.AlphabetArrayParameterSet, AlphabetContainerParameterSet.SectionDefinedAlphabetParameterSet, ArrayParameterSet, AucPR, AucROC, BaumWelchParameterSet, BayesianNetworkDiffSMParameterSet, BayesianNetworkTrainSMParameterSet, BTExplainingAwayResidual.BTExplainingAwayResidualParameterSet, BTMutualInformation.BTMutualInformationParameterSet, ClassificationRate, ClassifierAssessmentAssessParameterSet, CombinedCondition.CombinedConditionParameterSet, ConfusionMatrix, ConstraintParameterSet, ContinuousAlphabet.ContinuousAlphabetParameterSet, DGTrainSMParameterSet, DiscreteAlphabet.DiscreteAlphabetParameterSet, DNAAlphabet.DNAAlphabetParameterSet, DNAAlphabetContainer.DNAAlphabetContainerParameterSet, EnumParameter, ExpandableParameterSet, FalsePositiveRateForFixedSensitivity, FileParameter, FSDAGModelForGibbsSamplingParameterSet, FSDAGTrainSMParameterSet, FSMEMParameterSet, GenDisMixClassifierParameterSet, GenericComplementableDiscreteAlphabet.GenericComplementableDiscreteAlphabetParameterSet, HMMTrainingParameterSet, HomMMParameterSet, HomogeneousTrainSMParameterSet, IDGTrainSMParameterSet, InhomogeneousMarkov.InhomogeneousMarkovParameterSet, InstanceParameterSet, IterationCondition.IterationConditionParameterSet, KFoldCrossValidationAssessParameterSet, MaxHMMTrainingParameterSet, MaximumCorrelationCoefficient, MaximumFMeasure, MaximumNumericalTwoClassMeasure, Measure.MeasureParameterSet, MEManagerParameterSet, MultilineSimpleParameter, MultipleIterationsCondition.MultipleIterationsConditionParameterSet, MultiSelectionParameter, MultiThreadedTrainingParameterSet, NumberValidator, NumericalHMMTrainingParameterSet, NumericalPerformanceMeasureParameterSet, ParameterSet, ParameterSetContainer, PerformanceMeasureParameterSet, PMMExplainingAwayResidual.PMMExplainingAwayResidualParameterSet, PMMMutualInformation.PMMMutualInformationParameterSet, PositivePredictiveValueForFixedSensitivity, PRCurve, ProteinAlphabet.ProteinAlphabetParameterSet, RangeParameter, RepeatedHoldOutAssessParameterSet, RepeatedSubSamplingAssessParameterSet, ROCCurve, Sampled_RepeatedHoldOutAssessParameterSet, SamplingGenDisMixClassifierParameterSet, SamplingHMMTrainingParameterSet, SamplingScoreBasedClassifierParameterSet, ScoreClassifierParameterSet, SelectionParameter, SensitivityForFixedSpecificity, SequenceScoringParameterSet, SimpleParameter, SimpleParameterSet, SmallDifferenceOfFunctionEvaluationsCondition.SmallDifferenceOfFunctionEvaluationsConditionParameterSet, SmallGradientConditon.SmallGradientConditonParameterSet, SmallStepCondition.SmallStepConditionParameterSet, TimeCondition.TimeConditionParameterSet, VarianceRatioBurnInTestParameterSet, ViterbiParameterSet

public interface GalaxyConvertible

Interface for Parameters that can be converted to and extracted from Galaxy representations. The methods of this interface are used in the GalaxyAdaptor to create Galaxy representation, i.e., config-files, from ParameterSets that contain the parameters for a specific application.

Author:
Jan Grau

Method Summary
 void fromGalaxy(String namePrefix, StringBuffer command)
          Parses the contents of command in the format defined by configBuffer of toGalaxy(String, String, int, StringBuffer, StringBuffer, boolean) and sets the values of the Parameter or ParameterSet accordingly.
 void toGalaxy(String namePrefix, String configPrefix, int depth, StringBuffer descBuffer, StringBuffer configBuffer, boolean addLine)
          Creates an Galaxy XML-representation of the parameters and appends it to descBuffer and variable configuration and appends it to configBuffer.
 

Method Detail

toGalaxy

void toGalaxy(String namePrefix,
              String configPrefix,
              int depth,
              StringBuffer descBuffer,
              StringBuffer configBuffer,
              boolean addLine)
              throws Exception
Creates an Galaxy XML-representation of the parameters and appends it to descBuffer and variable configuration and appends it to configBuffer. The variable configuration is also used to parse user-supplied values returned by Galaxy.

Parameters:
namePrefix - the prefix of the variable name used in Galaxy
configPrefix - the prefix for conditionals
depth - the depth in the parameter hierarchy, used for graphical representation of nesting
descBuffer - the buffer for the parameter description
configBuffer - the buffer for the configuration line
addLine - if true, a line is added before the title of a parameter
Throws:
Exception - if the conversion fails

fromGalaxy

void fromGalaxy(String namePrefix,
                StringBuffer command)
                throws Exception
Parses the contents of command in the format defined by configBuffer of toGalaxy(String, String, int, StringBuffer, StringBuffer, boolean) and sets the values of the Parameter or ParameterSet accordingly.

Parameters:
namePrefix - the prefix of the variable name
command - the command string
Throws:
Exception - if the command string could not be parsed