thorstenwagner / TraJ

Library for diffusion trajectory analysis
MIT License
11 stars 4 forks source link

Program accessibility #4

Open nikos-95 opened 7 years ago

nikos-95 commented 7 years ago

Sorry if this is the wrong place, but I didn't know how else to contact you or approach the topic. The functionality of this project looks really powerful and I was eager to use it for analysis of my single particle tracking data. However, I realized that it is a java library, not an ImageJ plugin (or contained in TraJ Classifier). Having just very limited experience with Java like most life science researchers, I didn't manage to run it despite installing Eclipse and JDK, and I cannot find any documentation on how to access the library functions. So my proposal would be that a quick start tutorial, like a readme, would be created that shows how to run the functions in the most easy way. Even better would be a program documentation and examples, or a GUI for ImageJ. However, I understand that this is a lot of work and that the complex functionality is hard to streamline, so I would be happy with the quick start alone.

imagejan commented 7 years ago

@nikos-95

Sorry if this is the wrong place, but I didn't know how else to contact you or approach the topic.

I guess it is fine here, but I recommend to direct questions about general usage to the ImageJ forum, as github is usually more targeting software developers rather than users.

You can use this library via TraJClassifier which is installed simply by activating the respective update site in your ImageJ installation.

nikos-95 commented 7 years ago

@imagejan thanks for the tip! However, it seems that the ImageJ plugin is focused only on classification of long trajectories and doesn't enable access to all library functions, like diffusion coefficient estimation, MSD statistics or motionmodel based track simulation. In my case, most trajectories have less than 10 points and not the best SNR and can therefore only be analyzed when pooled. Otherwise I would just cherrypick the few long trajectories, which skews the result. This is the reason it would be much appreciated to use the program function directly.

imagejan commented 7 years ago

Yeah, I guess in this case some quickstart examples would be useful indeed. @thorstenwagner what do you think?

You in fact can access all library functions in ImageJ (after activating the update site), but you'll have to do it via scripting, e.g. in Groovy:

import de.biomedical_imaging.traJ.DiffusionCoefficientEstimator.CovarianceDiffusionCoefficientEstimator

track = // get your trajectory
fps = 24.0

est = new CovarianceDiffusionCoefficientEstimator()
coefficient = est.getDiffusionCoefficient(track, fps)

I still think it would be great to discuss thing like that on the forum.

Also, if you wish to have more control over the calculations you're doing on your data without having to code in Java or any scripting language, I recommend using KNIME, see http://doi.org/10.13140/RG.2.2.16490.31688 and the linked research article.

thorstenwagner commented 7 years ago

Hi @imagejan & @nikos-95 ,

sorry that it tooks me so long to reply. At the moment, the TraJ library is a pure java library with no GUI. The TraJClassifier Plugins simply use SOME of the library functions. Unfortunately I've started my new job only 4 weeks ago and do not have much time at the moment.

A good starting point how to build a trajectory and calculate features could be the following unit test: https://github.com/thorstenwagner/TraJ/blob/master/src/test/java/de/biomedical_imaging/traj/features/test/MeanSpeedFeatureTest.java

For calculating the diffusion coefficient this unit test might be helpfull: https://github.com/thorstenwagner/TraJ/blob/master/src/test/java/de/biomedical_imaging/traJ/test/ConvarianceDiffusionCoefficientEstimatorTest.java#L81

As soon as possible I will try to formulate some simple programming examples.

Best, Thorsten

nikos-95 commented 7 years ago

Hello again, @imagejan , I appreciate the tip about groovy and will definitely try it out. It looks easier than doing it in eclipse and if I do need more help I will discuss it in the forums. @thorstenwagner , the problem is kind of that I didn't know how to run those, so I'd appreciate if you start really basic with the programming examples. Anyways, don't stress yourself, I look forward to it eventually and might get it with groovy. Also, I am having some success with tinevez' msdanalyzer in matlab. It is very convenient, but doesn't have nearly as many functions as TraJ.