diff --git a/spim_registration/timelapse/Snakefile b/spim_registration/timelapse/Snakefile index 95e865b866f6cf44371e02e9544a38d088d2c2a9..7d20dad47afc6e667ccf51e711464dd3cdd4bed9 100644 --- a/spim_registration/timelapse/Snakefile +++ b/spim_registration/timelapse/Snakefile @@ -8,6 +8,8 @@ if JOBDIR[-1] != "/": # this checks if jobdir ends with slash if not it adds a s #data specific config file, expected to be inside JOBDIR configfile: "tomancak_test_cluster.json" +# configfile: "tomancak_test_cluster.yaml" + padding_format = "{0:0"+str(padding_of_file_id(int(config["common"]["ntimepoints"])))+"d}" ds_format = "-"+padding_format+"-00.h5" @@ -406,7 +408,7 @@ rule define_output: rule hdf5_xml_output: input: config["hdf5_output"]["output_xml"].strip('\"') + ".xml" output: expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"].strip('\"')], suffix=["xml","h5"]), - [ item+"_output" for item in datasets ] # expand("{dataset}.{suffix}",dataset=[ config["hdf5_output"]["output_hdf5_xml"].strip('\"')], suffix=["xml","h5"]), "{xml_base}-{file_id,\d+}-00.h5_output_hdf5_xml" + [ item+"_output" for item in datasets ] log: "hdf5_xml.log" run: part_string = produce_string( @@ -469,7 +471,7 @@ rule resave_hdf5_output: rule distclean: - params : glob.glob(config["common"]["hdf5_xml_filename"].strip('\"')+"*"), glob.glob(config["common"]["first_xml_filename"].strip('\"')+"*"), glob.glob("*registered"), glob.glob("*_fusion"), glob.glob("*_timelapse"), glob.glob("*log"), glob.glob("*_deconvolved"), glob.glob("*.xml~*"),"interestpoints", glob.glob("*empty"), expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"].strip('\"')], suffix=["xml","h5"])# xml_merge_in, + params : glob.glob(config["common"]["hdf5_xml_filename"].strip('\"')+"*"), glob.glob(config["common"]["first_xml_filename"].strip('\"')+"*"), glob.glob("*registered"), glob.glob("*_fusion"), glob.glob("*_timelapse"), glob.glob("*log"), glob.glob("*_deconvolved"), glob.glob("*.xml~*"),"interestpoints", glob.glob("*empty"), expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"].strip('\"')], suffix=["xml","h5"]), glob.glob("*_output_hdf5"), glob.glob("*_output")# xml_merge_in, message : os.path.abspath(os.path.curdir) + ": rm -rf {params}" shell : "rm -rf {params}" diff --git a/spim_registration/timelapse/tomancak.json b/spim_registration/timelapse/tomancak.json index b1a87ba51d43edd2bb5a778b1680030c116c3688..021578435e6439631f55fdcb0780d5de97888993 100644 --- a/spim_registration/timelapse/tomancak.json +++ b/spim_registration/timelapse/tomancak.json @@ -1,7 +1,7 @@ { "common" : { - "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher-sandbox/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", + "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", "fiji-prefix" : "/sw/bin/xvfb-run -a", "directory_cuda" : "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/", "merged_xml" : "hdf5_test_unicore_merge" diff --git a/spim_registration/timelapse/tomancak_czi.json b/spim_registration/timelapse/tomancak_czi.json index 7c14583d1bd6ecc7515a1f8f586b8365ab8f38f1..9a2445f03860cec92dec550035d55edcc38ada2e 100644 --- a/spim_registration/timelapse/tomancak_czi.json +++ b/spim_registration/timelapse/tomancak_czi.json @@ -1,7 +1,7 @@ { "common" : { - "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher-sandbox/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", + "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", "fiji-prefix" : "/sw/bin/xvfb-run -a", "directory_cuda" : "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/", "merged_xml" : "hdf5_test_unicore_merge", diff --git a/spim_registration/timelapse/tomancak_test_cluster.json b/spim_registration/timelapse/tomancak_test_cluster.json index 0559f68e6de60cbf7162561776fb46a2a80e769a..44899c53b1b4dca63946a6b2a9d852faa25c9909 100644 --- a/spim_registration/timelapse/tomancak_test_cluster.json +++ b/spim_registration/timelapse/tomancak_test_cluster.json @@ -1,7 +1,7 @@ { "common" : { - "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher-sandbox/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", + "fiji-app" : "/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", "fiji-prefix" : "/sw/bin/xvfb-run -a", "directory_cuda" : "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/", "merged_xml" : "hdf5_test_unicore_merge", diff --git a/spim_registration/timelapse/tomancak_test_cluster.yaml b/spim_registration/timelapse/tomancak_test_cluster.yaml new file mode 100644 index 0000000000000000000000000000000000000000..fa7788278a9544938599cef4df97a171c7445811 --- /dev/null +++ b/spim_registration/timelapse/tomancak_test_cluster.yaml @@ -0,0 +1,189 @@ +common: + { + # directory that contains the bean shell scripts + bsh_directory: "/home/steinbac/development/schmied-snakemake-workflows/spim_registration/timelapse/", + directory_cuda: "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/", + fiji-app: "/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/ImageJ-linux64", + fiji-prefix: "/sw/bin/xvfb-run -a", + first_xml_filename: "test_unicore", + fusion_switch: "deconvolution", + hdf5_xml_filename: '"hdf5_test_unicore"', + merged_xml: "hdf5_test_unicore_merge", + ntimepoints: 5 + } + +deconvolution: + { + Tikhonov_parameter: '0.0006', + bsh_file: "deconvolution_GPU.bsh", + compute: '"in 512x512x512 blocks"', + compute_on: '"GPU (Nvidia CUDA via JNA)"', + detections_to_extract_psf_for_channel_0: '"beads"', + detections_to_extract_psf_for_channel_1: '"beads"', + imglib2_container: '"ArrayImg"', + iterations: '5', + maximal_x: '509', + maximal_y: '970', + maximal_z: '243', + minimal_x: '95', + minimal_y: '-8', + minimal_z: '-174', + osem_acceleration: '"1 (balanced)"', + process_angle: '"All angles"', + process_channel: '"All channels"', + process_illumination: '"All illuminations"', + process_timepoint: '"Single Timepoint (Select from List)"', + psf_estimation: '"Extract from beads"', + psf_size_x: '19', + psf_size_y: '19', + psf_size_z: '25', + type_of_iteration: '"Efficient Bayesian - Optimization I (fast, precise)"' + } + +define_xml_czi: + { + angle_1: '0', + angle_2: '72', + angle_3: '144', + angle_4: '216', + angle_5: '288', + bsh_file: "define_czi.bsh", + channel_1: "green", + channel_2: "red", + first_czi: "2015-04-11_LZ2_Stock68_3.czi", + illumination_1: '0', + pixel_distance_x: '0.28590106964', + pixel_distance_y: '0.28590106964', + pixel_distance_z: '1.50000', + pixel_unit: "um", + rotation_around: "X-Axis" + } + +define_xml_tif: + { + acquisition_angles: '0,72,144,216,288', + bsh_file: "define_tif_zip.bsh", + channels: '0', + image_file_pattern: 'img_TL{{t}}_Angle{{a}}.tif', + imglib_container: '"ArrayImg (faster)"', + multiple_angles: '"YES (one file per angle)"', + multiple_channels: '"NO (one channel)"', + multiple_illumination_directions: '"NO (one illumination direction)"', + multiple_timepoints: '"YES (one file per time-point)"', + pixel_distance_x: '0.28590106964', + pixel_distance_y: '0.28590106964', + pixel_distance_z: '1.50000', + pixel_unit: "um", + type_of_dataset: '"Image Stacks (ImageJ Opener)"' + } + + +external_transform: + { + angle: '"All angles"', + apply_transformation: '"Current view transformations + (appends to current transforms)"', + bsh_file: "transform.bsh", + channel: '"All channels"', + define_mode_transform: '"Matrix"', + illumination: '"All illuminations"', + matrix_transform: '"0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0"', + timepoint: '"All Timepoints"', + transformation: '"Rigid"' + } + +fusion: { + bsh_file: "fusion.bsh", + downsample: '1', + fused_image: '"Append to current XML Project"', + imglib2_container_fusion: '"ArrayImg"', + imglib2_data_container: '"ArrayImg (faster)"', + interpolation: '"Linear Interpolation"', + maximal_x: '1019', + maximal_y: '1941', + maximal_z: '486', + minimal_x: '190', + minimal_y: '-16', + minimal_z: '-348', + pixel_type: '"16-bit unsigned integer"', + process_angle: '"All angles"', + process_channel: '"All channels"', + process_illumination: '"All illuminations"', + process_timepoint: '"Single Timepoint (Select from List)"', + process_views_in_paralell: '"All"', + xml_output: '"Save every XML with user-provided unique id"' + } + +hdf5_output: { + bsh_file_define: "define_output.bsh", + bsh_file_hdf5: "export_output.bsh", + convert_32bit: '"[Use min/max of first image (might saturate intenities over time)]"', + output_channels: "green", + output_data_type: "32Bit", + output_hdf5_xml: '"hdf5_fused_Stock68"', + output_illumination_directions: '"NO (one illumination direction)"', + output_image_file_pattern: 'TP{{t}}_Ch{{c}}_Ill0_Ang0,72,144,216,288.tif', + output_imglib_container: '"ArrayImg (faster)"', + output_multiple_angles: '"NO (one angle)"', + output_multiple_channels: '"NO (one channel)"', + output_multiple_timepoints: '"YES (one file per time-point)"', + output_pixel_distance_x: 0.5718, + output_pixel_distance_y: 0.5718, + output_pixel_distance_z: 0.5718, + output_pixel_unit: 'um', + output_timepoints: '0-4', + output_type_of_dataset: '"Image Stacks (ImageJ Opener)"', + output_xml: '"fused_Dual_Channel"'} + +registration: { + algorithm: '"Fast 3d geometric hashing (rotation invariant)"', + allowed_error_for_ransac: '5', + angle: '"All angles"', + bsh_file: "registration.bsh", + channel: '"All channels"', + detection_min_max: "find_maxima", + fix_tiles: '"Fix first tile"', + illuminations: '"All illuminations"', + imglib_container: '"ArrayImg (faster)"', + initial_sigma: '1.8', + interest_points_channel_0: '"beads"', + interest_points_channel_1: '"beads"', + label_interest_points: '"beads"', + lambda: '0.10', + map_back_tiles: '"Map back to first tile using rigid model"', + model_to_regularize_with: "Rigid", + proc-ch: '"channel 0"', + radius_1: '2', + radius_2: '3', + significance: '10', + subpixel_localization: '"3-dimensional quadratic fit"', + threshold: '0.005', + threshold_gaussian: '0.0080', + timepoint: '"Single Timepoint (Select from List)"', + transformation_model: "Affine", + type_of_detection: '"Difference-of-Mean (Integral image based)"', + type_of_registration: '"Register timepoints individually"' + } + +resave_hdf5: { + bsh_file: "export.bsh", + hdf5_chunk_sizes: '"{{ {{32,32,4}}, {{32,32,4}}, {{16,16,16}}, {{16,16,16}} }}"', + resave_angle: '"All angles"', + resave_channel: '"All channels"', + resave_illumination: '"All illuminations"', + resave_timepoint: '"All Timepoints"', + setups_per_partition: '0', + subsampling_factors: '"{{ {{1,1,1}}, {{2,2,1}}, {{4,4,1}}, {{8,8,1}} }}"', + timepoints_per_partition: '1'} + +timelapse: { + bsh_file: "timelapse_registration.bsh", + reference_timepoint: '0', + timelapse_process_timepoints: '"All Timepoints"', + type_of_registration_timelapse: '"Match against one reference timepoint (no global optimization)"' + } + +xml_merge: { + bsh_file: "xml_merge.bsh" + } +