Skip to content
Snippets Groups Projects
Commit 0bc8aba3 authored by Christopher Schmied's avatar Christopher Schmied
Browse files

resave hdf5

parent b1d34bb7
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ rule define_xml_czi: ...@@ -71,7 +71,7 @@ rule define_xml_czi:
rule define_xml_tif: rule define_xml_tif:
input: glob.glob('*.tif') input: glob.glob('*.tif')
output: config["common"]["first_xml_filename"] + ".xml" output: config["common"]["first_xml_filename"] + ".xml"
message: "Execute define_xml_czi on the following files {input}" message: "Execute define_xml_tif on the following files {input}"
log: "define_xml_tif.log" log: "define_xml_tif.log"
run: run:
cmd_string = produce_string( cmd_string = produce_string(
...@@ -97,18 +97,17 @@ rule define_xml_tif: ...@@ -97,18 +97,17 @@ 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"])
cmd_string +="> {log} 2>&1 && touch {output}" cmd_string +="> {log} 2>&1 && touch {output}"
shell(cmd_string) shell(cmd_string)
# resave .czi dataset as hdf5 # resave .czi dataset as hdf5
rule resave_czi_hdf5: rule resave_hdf5:
# input: config["common"]["first_xml_filename"] + ".xml"
input: rules.define_xml_tif.output, glob.glob('*.tif') input: rules.define_xml_tif.output, glob.glob('*.tif')
# output: "hdf5_Stock68.h5", "hdf5_Stock68.xml" output: "hdf5_test_unicore.xml", "hdf5_test_unicore.h5"
output: config["common"]["hdf5_xml_filename"] + ".xml", config["common"]["hdf5_xml_filename"] + ".h5"
message: "Execute resave_hdf5 on {input}" message: "Execute resave_hdf5 on {input}"
# threads: int(config["resave_hdf5"]["parallel_timepoints"]) # parallel timepoints should tell me how many timepoints to expect threads: int(config["resave_hdf5"]["parallel_timepoints"]) # parallel timepoints should tell me how many timepoints to expect
log: "export_czi.log" log: "resave_hdf5.log"
run: run:
part_string = produce_string( part_string = produce_string(
"""{fiji-prefix} {fiji-app} \ """{fiji-prefix} {fiji-app} \
...@@ -130,14 +129,16 @@ rule resave_czi_hdf5: ...@@ -130,14 +129,16 @@ rule resave_czi_hdf5:
config["resave_hdf5"], config["resave_hdf5"],
jdir=JOBDIR, jdir=JOBDIR,
path_bsh=config["common"]["bsh_directory"] + config["resave_hdf5"]["bsh_file"]) path_bsh=config["common"]["bsh_directory"] + config["resave_hdf5"]["bsh_file"])
cmd_string = "" cmd_string = ""
for i in range(int(config["resave_hdf5"]["parallel_timepoints"])): for i in range(int(config["resave_hdf5"]["parallel_timepoints"])):
cmd_string += part_string.format(job_number=i) cmd_string += part_string.format(job_number=i)
#cmd_string += "> {log} 2>&1 && touch {output}"
shell(cmd_string) shell(cmd_string)
rule registration: rule registration:
input: "{xml_base}-{file_id}-00.h5" input: "{xml_base}-{file_id}-00.h5", rules.resave_hdf5.output
#input: rules.resave_hdf5.output, "{xml_base}-{file_id}-00.h5" #input: rules.resave_hdf5.output, "{xml_base}-{file_id}-00.h5"
output: "{xml_base}-{file_id,\d+}-00.h5_registered", #"{xml_base}.job_{file_id,\d+}.xml" output: "{xml_base}-{file_id,\d+}-00.h5_registered", #"{xml_base}.job_{file_id,\d+}.xml"
log: "{xml_base}-{file_id}-registration.log" log: "{xml_base}-{file_id}-registration.log"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"bsh_directory" : "/projects/pilot_spim/Christopher/snakemake-workflows/spim_registration/timelapse/", "bsh_directory" : "/projects/pilot_spim/Christopher/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" : "fusion" "fusion_switch" : "deconvolution"
}, },
"define_xml_czi" : "define_xml_czi" :
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
"bsh_file" : "define_tif_zip.bsh" "bsh_file" : "define_tif_zip.bsh"
}, },
"resave_czi_hdf5" : "resave_hdf5" :
{ {
"parallel_timepoints" : "2", "parallel_timepoints" : "3",
"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