Skip to content
Snippets Groups Projects
Commit c5cf2be6 authored by schmiedc's avatar schmiedc
Browse files

Merge pull request #6 from psteinb/adding_resave

more bugfixes related to removing superfluous information for .tif files
parents 49ddd68f 77f3b4bf
No related branches found
No related tags found
No related merge requests found
...@@ -11,17 +11,14 @@ configfile: "tomancak_test_cluster.json" ...@@ -11,17 +11,14 @@ configfile: "tomancak_test_cluster.json"
padding_format = "{0:0"+str(padding_of_file_id(int(config["common"]["ntimepoints"])))+"d}" padding_format = "{0:0"+str(padding_of_file_id(int(config["common"]["ntimepoints"])))+"d}"
ds_format = "-"+padding_format+"-00.h5" ds_format = "-"+padding_format+"-00.h5"
# problematic needs padding of file_id # problematic needs padding of file_id
datasets = [ str(config["common"]["hdf5_xml_filename"].strip('\"')+(ds_format.format(item))) for item in range(int(config["common"]["ntimepoints"])) ] datasets = [ str(config["common"]["hdf5_xml_filename"].strip('\"')+(ds_format.format(item))) for item in range(int(config["common"]["ntimepoints"])) ]
xml_merge_in = produce_xml_merge_job_files(datasets) xml_merge_in = produce_xml_merge_job_files(datasets)
rule done: rule done:
#input: [ ds+"_fusion" for ds in datasets ]
#input: [ ds + "_" + config["common"]["fusion_switch"] for ds in datasets ]
#input: config["hdf5_output"]["output_xml"] + ".xml"
input: [ ds + "_output_hdf5" for ds in datasets ] input: [ ds + "_output_hdf5" for ds in datasets ]
#input: config["hdf5_output"]["output_xml"].strip('\"') + ".xml"
rule resave_prepared: rule resave_prepared:
input: expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"] ], suffix=["xml","h5"]) input: expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"] ], suffix=["xml","h5"])
...@@ -61,7 +58,7 @@ rule define_xml_czi: ...@@ -61,7 +58,7 @@ rule define_xml_czi:
# defining xml for tif dataset # defining xml for tif dataset
rule define_xml_tif: rule define_xml_tif:
input: glob.glob('*.tif') input: glob.glob(re.sub("{{.}}","*",config["define_xml_tif"]['image_file_pattern'])) #replaces all occurrences of {{a}} (a can be any character) by * to use the string for globbing
output: config["common"]["first_xml_filename"] + ".xml" output: config["common"]["first_xml_filename"] + ".xml"
log: "define_xml_tif.log" log: "define_xml_tif.log"
run: run:
...@@ -88,7 +85,7 @@ rule define_xml_tif: ...@@ -88,7 +85,7 @@ rule define_xml_tif:
config["define_xml_tif"], config["define_xml_tif"],
jdir=JOBDIR, jdir=JOBDIR,
path_bsh=config["common"]["bsh_directory"] + config["define_xml_tif"]["bsh_file"], path_bsh=config["common"]["bsh_directory"] + config["define_xml_tif"]["bsh_file"],
timepoints="1-"+str(config["common"]["ntimepoints"]) timepoints="0-"+str(int(config["common"]["ntimepoints"])-1)
) )
cmd_string +=" > {log} 2>&1" cmd_string +=" > {log} 2>&1"
...@@ -377,7 +374,7 @@ rule deconvolution: ...@@ -377,7 +374,7 @@ rule deconvolution:
rule define_output: rule define_output:
input: [ item + "_" + config["common"]["fusion_switch"] for item in datasets ], glob.glob('TP*') input: [ item + "_" + config["common"]["fusion_switch"] for item in datasets ], glob.glob('TP*')
output: config["hdf5_output"]["output_xml"].strip('\"') + ".xml" output: config["hdf5_output"]["output_xml"].strip('\"') + ".xml"
log: "define_xml_tif.log" log: "define_output.log"
run: run:
cmd_string = produce_string( cmd_string = produce_string(
"""{fiji-prefix} {fiji-app} \ """{fiji-prefix} {fiji-app} \
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"fiji-prefix" : "/sw/bin/xvfb-run -a", "fiji-prefix" : "/sw/bin/xvfb-run -a",
"directory_cuda" : "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/", "directory_cuda" : "/lustre/projects/hpcsupport/steinbac/unicore/christopher/unicore_jobs/Fiji.app.cuda_new/lib/",
"merged_xml" : "hdf5_test_unicore_merge", "merged_xml" : "hdf5_test_unicore_merge",
"bsh_directory" : "/home/steinbac/development/cschmied-snakemake-workflows/spim_registration/timelapse/", "bsh_directory" : "/home/steinbac/development/schmied-snakemake-workflows/spim_registration/timelapse/",
"first_xml_filename" : "test_unicore", "first_xml_filename" : "test_unicore",
"hdf5_xml_filename" : "\"hdf5_test_unicore\"", "hdf5_xml_filename" : "\"hdf5_test_unicore\"",
"fusion_switch" : "deconvolution", "fusion_switch" : "deconvolution",
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
"define_xml_tif" : "define_xml_tif" :
{ {
"timepoints" : "0-4",
"acquisition_angles" : "0,72,144,216,288", "acquisition_angles" : "0,72,144,216,288",
"channels" : "0", "channels" : "0",
"image_file_pattern" : "img_TL{{t}}_Angle{{a}}.tif", "image_file_pattern" : "img_TL{{t}}_Angle{{a}}.tif",
...@@ -52,7 +51,6 @@ ...@@ -52,7 +51,6 @@
"resave_hdf5" : "resave_hdf5" :
{ {
"parallel_timepoints" : "5",
"resave_angle" : "\"All angles\"", "resave_angle" : "\"All angles\"",
"resave_channel" : "\"All channels\"", "resave_channel" : "\"All channels\"",
"resave_illumination" : "\"All illuminations\"", "resave_illumination" : "\"All illuminations\"",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment