Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snakemake-workflows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIJI
snakemake-workflows
Commits
f27d9137
Commit
f27d9137
authored
9 years ago
by
Christopher Schmied
Browse files
Options
Downloads
Patches
Plain Diff
hdf5_xml works
parent
8b9b17a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
spim_registration/timelapse/Snakefile
+7
-10
7 additions, 10 deletions
spim_registration/timelapse/Snakefile
spim_registration/timelapse/export.bsh
+16
-3
16 additions, 3 deletions
spim_registration/timelapse/export.bsh
with
23 additions
and
13 deletions
spim_registration/timelapse/Snakefile
+
7
−
10
View file @
f27d9137
...
...
@@ -111,9 +111,8 @@ ruleorder: define_xml_tif > define_xml_czi
# create mother .xml/.h5
rule hdf5_xml:
input: config["common"]["first_xml_filename"] + ".xml"
output: expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"]
], suffix=["xml","h5"]),
output: expand("{dataset}.{suffix}",dataset=[ config["common"]["hdf5_xml_filename"]
.strip('\"')
], suffix=["xml","h5"]),
expand("{xml_base}-{file_id}-00.h5_empty", xml_base=[ config["common"]["hdf5_xml_filename"].strip('\"') ],file_id=range(int(config["common"]["ntimepoints"])))
log: "hdf5_xml.log"
run:
part_string = produce_string(
...
...
@@ -142,15 +141,14 @@ rule hdf5_xml:
#create dummy files according to the number of timepoints found
for index in range(int(config["common"]["ntimepoints"])):
shell("touch {basename}-{file_id}-00.h5_empty".format(basename=config["common"]["hdf5_xml_filename"],file_id=index))
shell("touch {basename}-{file_id}-00.h5_empty".format(basename=config["common"]["hdf5_xml_filename"],
file_id=index))
# resave .czi dataset as hdf5
rule resave_hdf5:
input: "{xml_base}-{file_id}-00.h5_empty"
input: "{xml_base}-{file_id}-00.h5_empty"
# rules.hdf5_xml.output
output: "{xml_base}-{file_id}-00.h5"
message: "Execute resave_hdf5 on {input}"
threads: int(config["resave_hdf5"]["parallel_timepoints"]) # parallel timepoints should tell me how many timepoints to expect
log: "resave_hdf5-{file_id}.log"
run:
part_string = produce_string(
...
...
@@ -167,20 +165,19 @@ rule resave_hdf5:
-Dtimepoints_per_partition={timepoints_per_partition} \
-Dsetups_per_partition={setups_per_partition} \
-Drun_only_job_number={job_number} \
-- --no-splash {path_bsh}
> {log}-{job_number}.log 2>&1 &\n
""", # the & submits everyting at once
-- --no-splash {path_bsh}""", # the & submits everyting at once
config["common"],
config["define_xml_czi"],
config["resave_hdf5"],
jdir=JOBDIR,
path_bsh=config["common"]["bsh_directory"] + config["resave_hdf5"]["bsh_file"],
intput_xml_base="{wildcards.xml_base}",
job_number=int("{wildcards.file_id}")+1
)
input_xml_base="{wildcards.xml_base}",
job_number="{wildcards.file_id}")
part_string += "> {log} 2>&1"
shell(part_string)
rule registration:
input: "{xml_base}-{file_id}-00.h5"
,
rules.resave_hdf5.output
input:
"{xml_base}-{file_id}-00.h5"
#
rules.resave_hdf5.output
#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"
log: "{xml_base}-{file_id}-registration.log"
...
...
This diff is collapsed.
Click to expand it.
spim_registration/timelapse/export.bsh
+
16
−
3
View file @
f27d9137
...
...
@@ -45,7 +45,8 @@ subsampling_factors = System.getProperty( "subsampling_factors" );
hdf5_chunk_sizes = System.getProperty( "hdf5_chunk_sizes" );
timepoints_per_partition = System.getProperty( "timepoints_per_partition" );
setups_per_partition = System.getProperty( "setups_per_partition" );
run_only_job_number = System.getProperty( "run_only_job_number" );
int run_only_job_number = Integer.parseInt( System.getProperty( "run_only_job_number" ) );
run_only_job_number = run_only_job_number + 1;
System.out.println( "subsampling_factors=" + subsampling_factors);
System.out.println( "hdf5_chunk_sizes=" + hdf5_chunk_sizes );
...
...
@@ -55,12 +56,19 @@ System.out.println( "run_only_job_number=" + run_only_job_number );
// Activate cluster processing
System.out.println("=========================================================");
try{
System.out.println("Cluster setting:");
IJ.run("Toggle Cluster Processing", "display_cluster");
}
catch ( e ) {
print( "[deconvolution-GPU] caught exception: "+e );
//important to fail the process if exception occurs
runtime.exit(1);
}
// Executes Fiji plugin
System.out.println("=========================================================");
System.out.println("Start plugin:");
try{
IJ.run("As HDF5",
"select_xml=" + image_file_directory + first_xml_filename + ".xml " +
"resave_angle=[" + resave_angle + "] " +
...
...
@@ -76,7 +84,12 @@ IJ.run("As HDF5",
"run_only_job_number=" + run_only_job_number + " " +
"use_deflate_compression " +
"export_path=" + image_file_directory + hdf5_xml_filename );
}
catch ( e ) {
print( "[deconvolution-GPU] caught exception: "+e );
//important to fail the process if exception occurs
runtime.exit(1);
}
/* shutdown */
System.exit(0);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment