Пример #1
0
        private IEnumerable <IOSPSuiteCommand> updateVascularEndotheliumExpressionParameters(IExecutionContext context)
        {
            var command        = new PKSimMacroCommand();
            var f_exp_pls_side = _protein.Parameter(CoreConstants.Parameters.FRACTION_EXPRESSED_VASC_ENDO_PLASMA_SIDE);
            var f_exp_endosome = _protein.Parameter(CoreConstants.Parameters.FRACTION_EXPRESSED_VASC_ENDO_ENDOSOME);
            var rel_exp_vasc   = _protein.Parameter(CoreConstants.Parameters.REL_EXP_VASCULAR_ENDOTHELIUM);

            //not in vasc endo => set expression to 0
            command.AddRange(setParametersForFlags(context, None, InVascularEndothelium, (rel_exp_vasc, 0)));

            //In plasma side and endosome but not tissue side => split equally between plasma side and endosome
            command.AddRange(setParametersForFlags(context, VascMembranePlasmaSide | VascEndosome, VascMembraneTissueSide, (f_exp_pls_side, 0.5), (f_exp_endosome, 0.5)));

            //In plasma side and tissue side but not endosome => split equally between plasma side and tissue side (tissue side = 1 - plasma side - endosome)
            command.AddRange(setParametersForFlags(context, VascMembranePlasmaSide | VascMembraneTissueSide, VascEndosome, (f_exp_pls_side, 0.5), (f_exp_endosome, 0)));

            //In endosome and tissue side but not plasma side => split equally between endosome and tissue side (tissue side = 1 - plasma side - endosome)
            command.AddRange(setParametersForFlags(context, VascEndosome | VascMembraneTissueSide, VascMembranePlasmaSide, (f_exp_pls_side, 0), (f_exp_endosome, 0.5)));

            //In plasma side but not endosome or tissue side => set all to plasma side
            command.AddRange(setParametersForFlags(context, VascMembranePlasmaSide, VascEndosome | VascMembraneTissueSide, (f_exp_pls_side, 1), (f_exp_endosome, 0)));

            //In endosome but not plasma side or tissue side => set all to endosome
            command.AddRange(setParametersForFlags(context, VascEndosome, VascMembranePlasmaSide | VascMembraneTissueSide, (f_exp_pls_side, 0), (f_exp_endosome, 1)));

            //In tissue side but not plasma side or endosome => set all to tissue side
            command.AddRange(setParametersForFlags(context, VascMembraneTissueSide, VascMembranePlasmaSide | VascEndosome, (f_exp_pls_side, 0), (f_exp_endosome, 0)));


            // no action is required when all localization settings of a group are active. {InVascularEndothelium, None}
            return(command.All());
        }
Пример #2
0
        private IEnumerable <IOSPSuiteCommand> updateBloodCellsExpressionParameters(IExecutionContext context)
        {
            var command       = new PKSimMacroCommand();
            var f_exp_bc_cell = _protein.Parameter(CoreConstants.Parameters.FRACTION_EXPRESSED_BLOOD_CELLS);
            var rel_exp_bc    = _protein.Parameter(CoreConstants.Parameters.REL_EXP_BLOOD_CELLS);

            //not in blood cells => set expression to 0
            command.AddRange(setParametersForFlags(context, None, InBloodCells, (rel_exp_bc, 0)));

            // Only in BC interstitial
            command.AddRange(setParametersForFlags(context, BloodCellsIntracellular, BloodCellsMembrane, (f_exp_bc_cell, 1)));

            // Only in BC membrane
            command.AddRange(setParametersForFlags(context, BloodCellsMembrane, BloodCellsIntracellular, (f_exp_bc_cell, 0)));

            // no action is required when all localization settings of a group are active. {InBloodCells, None}
            return(command.All());
        }
Пример #3
0
        private IEnumerable <IOSPSuiteCommand> updateTissueExpressionParameters(IExecutionContext context)
        {
            var command = new PKSimMacroCommand();
            //We need to iterate over all parameters defined in the protein and update the values as expected
            var allIntracellularFractionParameters = _simulationSubject.Individual.GetAllChildren <IParameter>(x =>
                                                                                                               x.IsNamed(CoreConstants.Parameters.FRACTION_EXPRESSED_INTRACELLULAR) && x.ParentContainer.IsNamed(_protein.Name));

            var allTissueRelExpParameters = _simulationSubject.Individual.GetAllChildren <IParameter>(x =>
                                                                                                      x.IsNamed(CoreConstants.Parameters.REL_EXP) && x.ParentContainer.IsNamed(_protein.Name));


            //not in tissue=> set expression to 0
            command.AddRange(setParametersForFlags(context, None, InTissue, allTissueRelExpParameters.Select(x => (x, 0.0)).ToArray()));

            //Only in Interstitial => set intracellular fraction to 0
            command.AddRange(setParametersForFlags(context, Interstitial, Intracellular, allIntracellularFractionParameters.Select(x => (x, 0.0)).ToArray()));

            //Only in Intracellular=> set intracellular fraction to 1
            command.AddRange(setParametersForFlags(context, Intracellular, Interstitial, allIntracellularFractionParameters.Select(x => (x, 1.0)).ToArray()));

            // no action is required when all localization settings of a group are active. {InTissue, None}

            return(command.All());
        }