Skip to content
Snippets Groups Projects
Commit 68bc626c authored by Peter Steinbach's avatar Peter Steinbach
Browse files

* updated beanshell file to throw away padded 0 in file_id

* updated Snakefile accordingly
parent 8789efd4
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ for ds in datasets: ...@@ -17,7 +17,7 @@ for ds in datasets:
bn = os.path.basename(ds) bn = os.path.basename(ds)
bn_res = fre.search(bn) bn_res = fre.search(bn)
xml_base,file_id = bn_res.group('xml_base'),bn_res.group('file_id') xml_base,file_id = bn_res.group('xml_base'),bn_res.group('file_id')
xml_merge_in.append("{xbase}.job_{fid}.xml".format(xbase=xml_base, fid=file_id)) xml_merge_in.append("{xbase}.job_{fid}.xml".format(xbase=xml_base, fid=int(file_id)))
#TODO: this should go into a python module in this path #TODO: this should go into a python module in this path
def produce_string(_fstring, *args, **kwargs): def produce_string(_fstring, *args, **kwargs):
...@@ -33,9 +33,9 @@ rule done: ...@@ -33,9 +33,9 @@ rule done:
input: [ ds+"_deconvolved" for ds in datasets ] input: [ ds+"_deconvolved" for ds in datasets ]
rule registration: rule registration:
input: "{xml_base}-{file_id,\d+}-00.h5" input: "{xml_base}-{file_id}-00.h5"
output: "{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,\d+}-registration.log" log: "{xml_base}-{file_id}-registration.log"
run: run:
cmd_string = produce_string( cmd_string = produce_string(
"""{fiji-prefix} {fiji-app} \ """{fiji-prefix} {fiji-app} \
...@@ -79,7 +79,7 @@ rule registration: ...@@ -79,7 +79,7 @@ rule registration:
#shell("touch {output}") #shell("touch {output}")
rule xml_merge: rule xml_merge:
input: xml_merge_in input: [ item+"_registered" for item in datasets ] #xml_merge_in
output: "{xml_base}_merge.xml" output: "{xml_base}_merge.xml"
log: "{xml_base}_merge.log" log: "{xml_base}_merge.log"
run: run:
...@@ -159,4 +159,4 @@ rule deconvolution: ...@@ -159,4 +159,4 @@ rule deconvolution:
shell(cmd_string) shell(cmd_string)
rule distclean: rule distclean:
shell : "rm -rf *registered *tif "+str(" ".join(xml_merge_in)) shell : "rm -rf *registered *tif *log *_deconvolved *.xml~* interestpoints "+str(" ".join(xml_merge_in))
...@@ -23,7 +23,7 @@ System.out.println( "selected_xml = " + xml_path + xml_filename + ".xml"); ...@@ -23,7 +23,7 @@ System.out.println( "selected_xml = " + xml_path + xml_filename + ".xml");
System.out.println( "-------------------------------------------------------" ); System.out.println( "-------------------------------------------------------" );
System.out.println( "General parameters: " ); System.out.println( "General parameters: " );
parallel_timepoints = System.getProperty( "parallel_timepoints" ); parallel_timepoints = Integer.parseInt(System.getProperty( "parallel_timepoints" ));
process_timepoint = System.getProperty( "process_timepoint" ); process_timepoint = System.getProperty( "process_timepoint" );
process_channel = System.getProperty( "process_channel" ); process_channel = System.getProperty( "process_channel" );
process_illumination = System.getProperty( "process_illumination" ); process_illumination = System.getProperty( "process_illumination" );
...@@ -101,13 +101,23 @@ System.out.println( "detection_min_max = " + detection_min_max ); ...@@ -101,13 +101,23 @@ System.out.println( "detection_min_max = " + detection_min_max );
//activate cluster processing //activate cluster processing
System.out.println( "=======================================================" ); System.out.println( "=======================================================" );
try {
IJ.run("Toggle Cluster Processing", "display_cluster"); IJ.run("Toggle Cluster Processing", "display_cluster");
}
catch ( e ) {
print( "[registration::activate_cluster_processing] caught exception: "+e );
//important to fail the process if exception occurs
runtime.exit(1);
}
System.out.println( "Activated Cluster Processing" ); System.out.println( "Activated Cluster Processing" );
//interest point detection //interest point detection
System.out.println( "=======================================================" ); System.out.println( "=======================================================" );
System.out.println( "Starting Detection of Interest Points" ); System.out.println( "Starting Detection of Interest Points" );
try {
IJ.run("Detect Interest Points for Registration", IJ.run("Detect Interest Points for Registration",
"select_xml=" + xml_path + xml_filename + ".xml " + "select_xml=" + xml_path + xml_filename + ".xml " +
"unique_id=" + parallel_timepoints + " " + "unique_id=" + parallel_timepoints + " " +
...@@ -127,7 +137,14 @@ IJ.run("Detect Interest Points for Registration", ...@@ -127,7 +137,14 @@ IJ.run("Detect Interest Points for Registration",
"radius_2=" + radius_2 + " " + "radius_2=" + radius_2 + " " +
"threshold=" + threshold + " " + "threshold=" + threshold + " " +
"find_maxima"); "find_maxima");
}
catch ( e ) {
print( "[registration::interest_points] caught exception: "+e );
//important to fail the process if exception occurs
runtime.exit(1);
}
//registration based on interest point detection //registration based on interest point detection
System.out.println( "=======================================================" ); System.out.println( "=======================================================" );
System.out.println( "Starting Registration" ); System.out.println( "Starting Registration" );
...@@ -156,7 +173,7 @@ try { ...@@ -156,7 +173,7 @@ try {
} }
catch ( e ) { catch ( e ) {
print( "[registration] caught exception: "+e ); print( "[registration::based_on_interestpoints] caught exception: "+e );
//important to fail the process if exception occurs //important to fail the process if exception occurs
runtime.exit(1); runtime.exit(1);
......
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