diff --git a/spim_registration/timelapse/Snakefile b/spim_registration/timelapse/Snakefile index 59f47048488598d31603cf22b1fbc114a2862d07..11a87650d2f45d3d2ca80e8916434230f254edd4 100755 --- a/spim_registration/timelapse/Snakefile +++ b/spim_registration/timelapse/Snakefile @@ -1,5 +1,5 @@ import os, glob, sys, re -from timelapse_utils import produce_xml_merge_job_files, produce_string, padding_of_file_id, glob_and_escape +from timelapse_utils import produce_xml_merge_job_files, produce_string, padding_of_file_id #where are we (can be configured through -d/--directory flag) JOBDIR=os.path.abspath(os.path.curdir) @@ -26,6 +26,7 @@ xml_merge_in = produce_xml_merge_job_files(datasets) rule done: input: [ ds + "_output_hdf5" for ds in datasets ] +<<<<<<< HEAD localrules: define_xml_tif, xml_merge, timelapse, duplicate_transformations, external_transform, define_output @@ -34,6 +35,7 @@ rule resave_prepared: # defining xml for czi dataset rule define_xml_czi: + input: config["common"]["first_czi"] output: temp(config["common"]["first_xml_filename"] + ".xml") log: "logs/a1_define_xml_czi.log" @@ -107,7 +109,7 @@ rule hdf5_xml: log: "logs/b1_hdf5_xml.log" run: part_string = produce_string( - """{fiji-prefix} {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_hdf5_xml} {fiji-app} \ -Dimage_file_directory={jdir} \ -Dfirst_xml_filename={first_xml_filename} \ -Dhdf5_xml_filename={hdf5_xml_filename} \ @@ -137,7 +139,7 @@ rule resave_hdf5: log: "logs/b2_resave_hdf5-{file_id}.log" run: part_string = produce_string( - """{fiji-prefix} sysconfcpus -n 2 {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_resave_hdf5} {fiji-app} \ -Dimage_file_directory={jdir} \ -Dfirst_xml_filename={first_xml_filename} \ -Dhdf5_xml_filename={input_xml_base} \ @@ -166,7 +168,7 @@ rule registration: log: "logs/c_{xml_base}-{file_id}-registration.log" run: cmd_string = produce_string( - """{fiji-prefix} sysconfcpus -n 2 {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_reg} {fiji-app} \ -Dparallel_timepoints={file_id_w} \ -Dimage_file_directory={jdir} \ -Dxml_filename={input_xml} \ @@ -298,7 +300,7 @@ rule fusion: log: "logs/e1_{xml_base}-{file_id,\d+}-00-fusion.log" run: cmd_string = produce_string( - """{fiji-prefix} sysconfcpus -n 6 {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_fusion} {fiji-app} \ -Dimage_file_directory={jdir} \ -Dparallel_timepoints={file_id_w} \ -Dmerged_xml={merged_xml_file} \ @@ -369,7 +371,7 @@ rule deconvolution: log: "logs/e2_{xml_base}-{file_id,\d+}-00-deconvolution.log" run: cmd_string = produce_string( - """{fiji-prefix} sysconfcpus -n 2 {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_deco} {fiji-app} \ -Dimage_file_directory={jdir} \ -Ddeco_output_file_directory={jdir} \ -Dmerged_xml={merged_xml_file} \ @@ -449,7 +451,7 @@ rule hdf5_xml_output: log: "logs/f2_output_hdf5_xml.log" run: part_string = produce_string( - """{fiji-prefix} {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_hdf5_xml_output} {fiji-app} \ -Dimage_file_directory={jdir} \ -Dfirst_xml_filename={output_xml} \ -Dhdf5_xml_filename={output_hdf5_xml} \ @@ -480,7 +482,7 @@ rule resave_hdf5_output: log: "logs/f3_resave_output-{file_id}.log" run: part_string = produce_string( - """{fiji-prefix} sysconfcpus -n 2 {fiji-app} \ + """{fiji-prefix} {sysconfcpus} {num_cores_resave_hdf5_output} {fiji-app} \ -Dimage_file_directory={jdir} \ -Dfirst_xml_filename={output_xml} \ -Dhdf5_xml_filename={output_hdf5_xml} \ @@ -508,7 +510,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"]), glob.glob("*_output_hdf5"), glob.glob("*_output")# 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("*_hdf5"), 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"), glob.glob("*.h5"), glob.glob("*.xml") message : os.path.abspath(os.path.curdir) + ": rm -rf {params}" shell : "rm -rf {params}"