Exemple #1
0
        private ICommand addMoleculeTo <TMolecule>(TMolecule molecule, TSimulationSubject simulationSubject, QueryExpressionResults queryExpressionResults) where TMolecule : IndividualMolecule
        {
            var command = _simulationSubjectExpressionTask.AddMoleculeTo(molecule, simulationSubject, queryExpressionResults);

            setDefaultFor(molecule, simulationSubject, queryExpressionResults.ProteinName);
            return(command);
        }
        public ICommand AddExpressionProfile(TSimulationSubject simulationSubject, ExpressionProfile expressionProfile)
        {
            var moleculeFactory = _individualMoleculeFactoryResolver.FactoryFor(expressionProfile.Molecule);
            var molecule        = moleculeFactory.AddMoleculeTo(simulationSubject, expressionProfile.MoleculeName);

            simulationSubject.AddExpressionProfile(expressionProfile);
            _expressionProfileUpdater.SynchroniseSimulationSubjectWithExpressionProfile(simulationSubject, expressionProfile);
            return(_simulationSubjectExpressionTask.AddMoleculeTo(molecule, simulationSubject));
        }