Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2170 some issue with fraciton expressed #2171

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

msevestre
Copy link
Member

No description provided.

private bool isV9Format(SnapshotExpressionProfile snapshot)
{
//Localization is only defined for protein and was added in v10
return snapshot.Localization == null && snapshot.TransportType == null;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a wrong condition indeed

@@ -186,6 +186,13 @@ private void addExpressionProfilesUsedBySimulationSubjectToProject(ISimulationSu
expressionProfile.Category = simulationSubject.Name;
_expressionProfileUpdater.SynchronizeExpressionProfileWithSimulationSubject(expressionProfile, simulationSubject);

//Some parameters are probably marked as FixedValue event thought they have not changed (Formula=>constant) due to change in
//definition of Fraction expressed basolateral going from a constant to a formula. We reset
expressionProfile.Individual.AllMoleculeParametersFor(expressionProfile.Molecule)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gbecause we explictely overwrite formula with constant in this very specific case (the comment says for Permeability formula)...

protected override void TypedDeserialize(TPopulation population, XElement element, SerializationContext serializationContext)
{
//Lazy loading a population may results in expression profiles references being wiped out. We save them before setting them back again
var allExpressionProfiles = population.AllExpressionProfiles().ToArray();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. They are defined before we lazy load. Then we load from XML and they disappear (because ref are not saved in XML). therefor, some trickery here

@msevestre msevestre merged commit ee16051 into develop Apr 6, 2022
@msevestre msevestre deleted the 2170-some-issue-with-fraciton-expressed branch April 6, 2022 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants