Ejemplo n.º 1
0
        public IEnumerable <string> AllInducedMoleculeNames(IndividualMolecule molecule)
        {
            var processesInducedByProtein = AllEnabledProcesses().Where(ps => string.Equals(ps.MoleculeName, molecule.Name));
            var allInducedMolecules       = new List <string> {
                molecule.Name
            };

            allInducedMolecules.AddRange(processesInducedByProtein.Select(ps => ps.ProductName(ProductNameTemplate)));
            return(allInducedMolecules);
        }
Ejemplo n.º 2
0
 public virtual void RemoveMolecule(IndividualMolecule molecule)
 {
     RemoveChild(molecule);
 }
Ejemplo n.º 3
0
 public virtual void AddMolecule(IndividualMolecule molecule)
 {
     Add(molecule);
 }
Ejemplo n.º 4
0
 public ExpressionProfile ExpressionProfileFor(IndividualMolecule molecule) => AllExpressionProfiles().Find(x => string.Equals(x.MoleculeName, molecule.Name));
Ejemplo n.º 5
0
 /// <summary>
 ///    Returns all possible molecule containers of the individual in which <paramref name="molecule" /> will be defined.
 ///    This also returns global container under the global molecule named after <paramref name="molecule" />
 /// </summary>
 public IReadOnlyList <T> AllMoleculeContainersFor <T>(IndividualMolecule molecule) where T : MoleculeExpressionContainer =>
 GetAllChildren <T>(x => x.IsNamed(molecule.Name) || x.ParentContainer.IsNamed(molecule.Name));
Ejemplo n.º 6
0
 /// <summary>
 ///    Returns all possible molecule containers of the individual in which <paramref name="molecule" /> will be defined.
 ///    This also returns global container under the global molecule named after <paramref name="molecule" />
 /// </summary>
 public virtual IReadOnlyList <MoleculeExpressionContainer> AllMoleculeContainersFor(IndividualMolecule molecule) =>
 AllMoleculeContainersFor <MoleculeExpressionContainer>(molecule);
Ejemplo n.º 7
0
 /// <summary>
 ///    Returns all possible molecule parameters defined for <paramref name="molecule" /> in the individual.
 ///    This also returns the global molecule parameters
 /// </summary>
 public virtual IReadOnlyList <IParameter> AllMoleculeParametersFor(IndividualMolecule molecule) =>
 GetAllChildren <IContainer>(x => x.IsNamed(molecule.Name)).SelectMany(x => x.AllParameters()).ToList();
Ejemplo n.º 8
0
 /// <summary>
 ///    Returns all possible (physical) containers of the organism in which <paramref name="molecule" /> will be defined or
 ///    an empty array if the organism is not defined
 /// </summary>
 public virtual IReadOnlyList <IContainer> AllPhysicalContainersWithMoleculeFor(IndividualMolecule molecule) =>
 Organism?.GetAllChildren <IContainer>(x => x.IsNamed(molecule.Name)).Select(x => x.ParentContainer).ToArray() ?? Array.Empty <IContainer>();
Ejemplo n.º 9
0
 /// <summary>
 ///    returns the name of all molecules that will be created due to the active processes defined for a given protein
 /// </summary>
 public virtual IEnumerable <string> AllInducedMoleculeNames(IndividualMolecule molecule)
 {
     return(AllProcessSelectionGroups.SelectMany(x => x.AllInducedMoleculeNames(molecule)).Distinct());
 }