HeilemannLab / SPTAnalyser

Batch processing of single particle tracking data, MSD-analysis, hidden markov modeling, transition counting
GNU General Public License v3.0
2 stars 1 forks source link

DPB Converger #7

Closed AlexanderNiedrig closed 1 year ago

AlexanderNiedrig commented 1 year ago

Added:

AlexanderNiedrig commented 1 year ago

Furthermore, I had issues executing the code as the swft command is not recognized -> could you please have a look and run the code on my computer?

Error:

(SPTAnalyser) D:\Chemie_phd\SPTAnalyser\code_reviews\SPTAnalyser>swft.exe D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\cells\tracks\Fab_CS2_cell02.csv --tau "20" --out_values "all" --exp_displacement "nan" --exp_noise_rate "D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\PreAnalysisParameters\parameters\exp_noise_rate.txt" --max_displacement "nan" --max_displacement_pp "nan" --p_bleach "nan" --p_switch "0.01" --precision "D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\PreAnalysisParameters\parameters\precisions.txt" --diffraction_limit "42"
'swft.exe' is not recognized as an internal or external command, operable program or batch file.

Alright I checked how its done on the STED workstation and tried it at home so here is how it should work: it is necessary to add swift to the user enviroment variables, much like we tried today. However we added it to the system enviroment variables which apparently doesn"t work. So, like we tried, one has to naviagte to control panel ->view advanced system settings->enviroment variables There, in the top section one can select path->edit->new and add the directiory to the swift bin folder. I'll be sure to add that to the updated SPT manual.

JohannaRahm commented 1 year ago

Thanks for fixing the issue and documenting it! I tried running the script with a small test dataset but now get following error message:

(SPTAnalyser) D:\Chemie_phd\SPTAnalyser\code_reviews\SPTAnalyser>swft.exe D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\cells\tracks\Fab_CS2_cell02.csv --tau "20" --out_values "all" --exp_displacement "nan" --exp_noise_rate "D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\PreAnalysisParameters\parameters\exp_noise_rate.txt" --max_displacement "nan" --max_displacement_pp "nan" --p_bleach "nan" --p_switch "0.01" --precision "D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\PreAnalysisParameters\parameters\precisions.txt" --diffraction_limit "42"
Error: the argument ('D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2\PreAnalysisParameters\parameters\exp_noise_rate.txt') for option '--exp_noise_rate' is invalid

The folder structure of the test data is

test_data -> CS2-> cells -> tracks: contains TS localization files test_data -> CS2-> cells -> tracks: contains TS localization files

and the INPUT_DIRS in the config.ini are defined as

[INPUT_DIRS]
# list each coverslip
dir01 = D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS5
dir02 = D:\Chemie_phd\SPTAnalyser\code_reviews\test_data\CS2

I suspect that this is caused by the missing "PreAnalysisParameters\parameters\exp_noise_rate.txt", as I have not determined exp_noise_rate with the "BatchPreAnalysis" script. Let's add flexibility to that (see point 1).

Further points:

  1. It would be great to have the flexibility of either defining individual exp_noise_rates, which are extracted from the exp_noise_rate file or defining this parameter globally in the PARAMETERS_GLOBAL file. This parameter could either point to the "PreAnalysisParameters\parameters\exp_noise_rate.txt" path or be set to a global value. This would allow flexibility for deriving folder structures, for example in my case where I have not determined exp_noise_rate with the "BatchPreAnalysis" script.

  2. Could you please also include the missing swift parameters such as w_diffusion, w_immobile, w_directed, w_dir_diffusion, exp_dir_displacement, sd_angle, sd_rel_velocity, p_reappear, pruning_rate ... with their default values in the PARAMETER_GLOBAL section? We have never changed them, but it might come a time where this will be useful. The default values are defined in the swift manual under point 4.4. As these are many parameters it might make sense to separate them with comments in the PARAMETER_GLOBAL file, the first and current section could be named "essential parameters", followed by "directed motion parameters", "performance parameters" ... whatever makes sense!