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

Using a unique function to save both MultiCellDS data and intracellular data #197

Conversation

vincent-noel
Copy link
Contributor

@vincent-noel vincent-noel commented Aug 1, 2023

This comes as an effort to make the main.cpp of PhysiBoSS (and ultimately intracellular) models standard.
As of now, the only difference is that after saving the MultiCellDS data, I'm also saving a CSV PhysiBoSS state file. And if other intracellular models wants to save state, they have to do the same.

The idea here is to have a wrapper function to include MultiCellDS and intracellular data save, that I called save_PhysiCell_Timepoint and stored in PhysiCell_various_outputs.

There will have no impact on the rest of PhysiCell, since in this PR only PhysiBoSS Cell Lines example is using this wrapper. But ultimately, it would be nice if all projects would use it, so that we get a standard main.cpp file.

There is no hurry for this, I just wanted to code it to see what it would look like, and have your opinion about this.

At first I though about writing a wrapper to include the intracellular save with the full save, but after discussing with @elmbeech, and thinking more about this, I just need to add it to the MultiCellDS data. Here is what it would look like :

<cellular_information>
	<cell_populations>
		<cell_population type="individual">
			<custom>
				...
				<intracellular_data type="text" source="PhysiBoSS" data_version="2">
					<filename>output00000002_boolean_intracellular.csv</filename>
				</intracellular_data>
				...
			</custom>
		</cell_population>
	</cell_populations>
</cellular_information>

The name of the tag, the filename, are completely open to suggestions.
The filename use to be states_XXXXXXXX.csv, so it's already a breaking change for PhysiCell Studio and pcdl. I guess for them we would have to look at the XML file to see if the new intracellular_data field is there, otherwise check if the old format is there.

Let's talk about this !

@MathCancer
Copy link
Owner

Hmm, let's consider this one a bit more deeply after 1.13.1, just in case. I'm getting "branch conflicts" right now as well ...

Thanks!

@MathCancer
Copy link
Owner

on hold for now.

@vincent-noel vincent-noel force-pushed the feat/full_save_includes_intracellular branch 2 times, most recently from b55c0ee to 4631f3a Compare June 4, 2024 04:01
@vincent-noel
Copy link
Contributor Author

Ok I have a brand new proposal ! I updated the initial text

@MathCancer
Copy link
Owner

Hmm, so if I'm reading this correct, this adds a <custom> sub-field to an existing cell_population field?

This should work, although we may want to find a way to add it to the standard (for more general intracellular data) in the future. Do you have some sort of convention taht the list of cells in your custom is in the same order as in the "parent"?

@vincent-noel
Copy link
Contributor Author

Yes, it adds a new subfield, after the existing simplified_data, before the existing neighbor_graph fields. After thinking about it, I will rename it boolean_intracellular_data, so it won't step on the shoes of other intracellular addons.
As for the order of the list of cells, it follows the order of all_cells, and there is the cell ID as the first column of the CSV file.

@vincent-noel vincent-noel force-pushed the feat/full_save_includes_intracellular branch from 4631f3a to 451ca72 Compare June 4, 2024 23:12
@MathCancer
Copy link
Owner

Thanks. IN the future, maybe we will extend / stnadardize with something like:

<intracellular_data type="PhysiBoSS" data_version="1.0">

<intracellular_data type="SBML" data_version="2.4">

etc. Then we could have more in-depth discussion on how to standardize. But for now, in custom is the right place to put it. That's effectively a beta test until we're convinced it's a good design.

Great work, and great suggestion from @elmbeech !

Thanks!

@MathCancer
Copy link
Owner

checks look good. let's approve this PR. thank you!

@MathCancer MathCancer merged commit 8b240b4 into MathCancer:development Jun 5, 2024
5 checks passed
@elmbeech
Copy link
Contributor

elmbeech commented Jun 5, 2024

Thank you! Honestly, all credit to @vincent-noel!
I just mentioned to Vincent what would be best from the physicell data load point of view ": ).

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.

None yet

3 participants