MaMut: Writing additional data to mamut_xml-files

fiji
imagej

#1

Hi everyone!

I would like to write additional information into the mamut- xml file that I want to use for further analyses of my cell lineage with python. I want to write information on cell generation, identity of sub lineages or simple comments and cell fates into the attributes of the spot objects that are listed in the gamut-generated xml-file.

Trying around a bit I found out that I can add information in the format of key-value pairs (e.g. *cell_generation=„1“ ) to a spot - object. MaMut will still open the file normally.

A problem occurs when I enter information as a string of letters (e.g. fate=„mesoderm“ ). Then FIJI gives an exception when I try to open the file. I also tried adding appropriate entries to the spot features at the beginning of the file and changing the entry for isint from ‚true’ to ‚false‘.

Is there a way for me to write plain text into the spot-objects?
I would be very grateful for any advice.
Cheers,
Günther


#2

Hi @jirikowg

This is an interesting question!
Can you copy/paste an example with the error MaMuT gave when you try to open a modified file?


#3

OK. Here´s a copy of the error-message:
(Fiji Is Just) ImageJ 2.0.0-rc-67/1.52d; Java 1.8.0_66 [64-bit]; Mac OS X 10.12.6; 112MB of 6400MB (1%)

java.lang.NumberFormatException: For input string: “wow”
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at java.lang.Double.valueOf(Double.java:502)
at fiji.plugin.trackmate.io.TmXmlReader.createSpotFrom(TmXmlReader.java:1091)
at fiji.plugin.trackmate.io.TmXmlReader.getSpots(TmXmlReader.java:851)
at fiji.plugin.trackmate.io.TmXmlReader.getModel(TmXmlReader.java:323)
at fiji.plugin.mamut.LoadMamutAnnotationPlugin.load(LoadMamutAnnotationPlugin.java:95)
at fiji.plugin.mamut.LoadMamutAnnotationPlugin.run(LoadMamutAnnotationPlugin.java:82)
at ij.IJ.runUserPlugIn(IJ.java:228)
at ij.IJ.runPlugIn(IJ.java:192)
at ij.Executer.runCommand(Executer.java:137)
at ij.Executer.run(Executer.java:66)
at java.lang.Thread.run(Thread.java:745)

and I pasted a link to the .xml-file below creating the error message.
When I replace “wow” with “1” in line 47 0f the xml I do not get an error.

https://www.dropbox.com/s/tnlk1ua6xputerw/Probe34_Phoronis-muelleri_attrib_biocell2xml_4.xml?dl=0


#4

Ok so I checked what caused the error, and it turned out like this:
In the loading code, all the attrbutes of a spot in the XML files are transformed into a number:

spot.putFeature( att.getName(), Double.valueOf( att.getValue() ) );

If one of the attribute is not a number, then this line crashes.

I see no solution that would not require a change to TrackMate code. So I want to ask: Do you really need this? Do other people really need this as well?


#5

Hi Jean-Ives,
thanks for checking out the string problem. I was hoping to display user comments from converted SIMI-Biocell lineage data in the text window of track scheme, but it´s not a top priority, so no worries, and thanks again.


#6

Hopefully you will be able to write a Mastodon plugin to make just that.
… when we will release it :slight_smile: