diff --git a/spim_registration/timelapse/Snakefile b/spim_registration/timelapse/Snakefile index 812dccc659d3b7bfd2aed5728f94dd2c1cf1ebf2..178e91cc79655d23fe520207ae0598a97d84276d 100755 --- a/spim_registration/timelapse/Snakefile +++ b/spim_registration/timelapse/Snakefile @@ -253,9 +253,37 @@ rule timelapse: jdir=JOBDIR) cmd_string += " > {log} 2>&1 && touch {output}" shell(cmd_string) - + +rule dublicate_transformations: + input: rules.timelapse.output, merged_xml="{xml_base}_merge.xml" + output: rules.timelapse.output[0] + "_dublicate" + log: "{xml_base}_dublicate_transformations.log" + run: + cmd_string = produce_string( + """{fiji-prefix} {fiji-app} + -Dimage_file_directory={jdir} \ + -Dmerged_xml={merged_xml} \ + -Dprocess_timepoint_timelapse={timelapse_process_timepoints} \ + -Dprocess_illumination={reg_process_illumination} \ + -Dprocess_angle={reg_process_angle} \ + -Dsource_dublication={source_dublication} \ + -Dtarget_dublication={target_dublication} \ + -Dduplicate_which_transformations={duplicate_which_transformations} \ + -- --no-splash {path_bsh}""", + config["common"], + config["registration"], + config["timelapse"], + config["dublicate_channel"], + path_bsh=config["common"]["bsh_directory"] + config["Dublicate_transformations"]["bsh_file"], + jdir=JOBDIR, + file_id_w="{wildcards.file_id}", + merged_xml_file="{input.merged_xml}" + ) + cmd_string += " > {log} 2>&1 && touch {output}" + shell(cmd_string) + rule fusion: - input: rules.timelapse.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" + input: [ str("{xml_base}_merge.xml_" + config["common"]["transformation_switch"] ) ], "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" # rules.timelapse.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" output: "{xml_base}-{file_id,\d+}-00.h5_fusion" log: "{xml_base}-{file_id,\d+}-00-fusion.log" run: @@ -327,7 +355,7 @@ rule external_transform: shell(cmd_string) rule deconvolution: - input: rules.timelapse.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" # rules.external_transform.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" + input: [ str("{xml_base}_merge.xml_" + config["common"]["transformation_switch"] ) ], "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" # rules.timelapse.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" # rules.external_transform.output, "{xml_base}-{file_id,\d+}-00.h5", merged_xml="{xml_base}_merge.xml" output: "{xml_base}-{file_id,\d+}-00.h5_deconvolution" log: "{xml_base}-{file_id,\d+}-00-deconvolution.log" run: diff --git a/spim_registration/timelapse/tomancak_test_cluster.yaml b/spim_registration/timelapse/tomancak_test_cluster.yaml index 77c76210cd21385a3cbff9cf250fd1a697657831..60b1688d0ca8bac5d1029846f28e22e181895169 100755 --- a/spim_registration/timelapse/tomancak_test_cluster.yaml +++ b/spim_registration/timelapse/tomancak_test_cluster.yaml @@ -15,8 +15,10 @@ common: { pixel_distance_y: '0.28590106964', pixel_distance_z: '1.50000', pixel_unit: "um", - fusion_switch: "deconvolution" - # fusion_switch: "fusion" + # transformation_switch: "timelapse_dublicate", + transformation_switch: "timelapse", + # fusion_switch: "deconvolution" + fusion_switch: "fusion" } define_xml_czi: { @@ -92,7 +94,8 @@ timelapse: { Dublicate_transformations: { source_dublication: "red", target_dublication: "green", - bsh_file: "dublicate_channel.bsh" + duplicate_which_transformations: '"Replace all transformations"', + bsh_file: "Dublicate_transformations.bsh" } fusion: {