diff --git a/spim_registration/tools/czi_resave/create-resaving-jobs.sh b/spim_registration/tools/czi_resave/create-resaving-jobs.sh index 2874a6089ae69b0ceb91cd77fae6aece30e23b4a..8f1e0229704ac0a2318af33d83b0b78572bb6397 100755 --- a/spim_registration/tools/czi_resave/create-resaving-jobs.sh +++ b/spim_registration/tools/czi_resave/create-resaving-jobs.sh @@ -22,7 +22,6 @@ do -Dfirst_czi_name=${first_czi_name} \ -Dtimepoint=${timepoint} \ -Dangle=${angle} \ - -Dstack_size=${stack_size} \ -Dpad=${pad} \ -Dtif_timepoint=${tif_timepoint} \ -- --no-splash ${resaving}" >> "${job}" diff --git a/spim_registration/tools/czi_resave/resaving.bsh b/spim_registration/tools/czi_resave/resaving.bsh index 00bd0d7b7983e69782deac28abb97e00f9f8694c..25d97614ec7ce48923c900c8e8707d4012755096 100755 --- a/spim_registration/tools/czi_resave/resaving.bsh +++ b/spim_registration/tools/czi_resave/resaving.bsh @@ -39,15 +39,11 @@ System.out.println( "=======================================================" ); System.out.println( "Opening Image" ) ; IJ.run("Bio-Formats Importer", "open=" + dir + first_czi_name + " " + - "autoscale " + "color_mode=Default " + "specify_range " + "view=[Standard ImageJ] " + "stack_order=XYCZT " + "series_" + angle + " " + - "z_begin_" + angle + "=1 " + - "z_end_" + angle + "=" + stack_size + " " + - "z_step_" + angle + "=1 " + "t_begin_" + angle + "=" + timepoint + " " + "t_end_" + angle + "=" + timepoint + " " + "t_step_" + angle + "=1"); diff --git a/spim_registration/tools/master_preprocessing.sh b/spim_registration/tools/master_preprocessing.sh index 2bc2ed48ea71441f95abae0ccdeddac3a58f6f54..3ae3369970321129f830cb86ea89a14f3e332144 100755 --- a/spim_registration/tools/master_preprocessing.sh +++ b/spim_registration/tools/master_preprocessing.sh @@ -14,12 +14,10 @@ # REVISION: 2015-07-05 # # Preprocessing -# 1) rename .czi files -# 2) resave .czi files into .tif or .zip -# 3) resave ome.tiff files into .tif -# 4) Splitting output for Channel is -# c=0,1 etc -# spim_TL{tt}_Angle{a}_Channel{c}.tif +# resave single channel and dual channel .czi files into .tif +# output: img_TL{t}_Angle{a}.tif +# channels are 0,1 etc +# #=============================================================================== image_file_directory="/projects/pilot_spim/Christopher/cluster_test_HisYFP/2013-11-14_His-YFP_2/" @@ -34,7 +32,6 @@ job_directory="/projects/pilot_spim/Christopher/snakemake-workflows/spim_registr first_czi_name="2013-11-14_His-YFP_2.czi" timepoints="`seq 1 2`" # number of time points format: "`seq 0 1`" angles="1 2 3 4 5" # angles format: "1 2 3" -stack_size="142" pad="2" # for padded zeros first_timepoint="0" # Starts with 0 #------------------------------------------------------------------------------- @@ -49,12 +46,4 @@ Fiji="/sw/users/schmied/packages/2015-06-30_Fiji.app.cuda/ImageJ-linux64" #--- Resaving .czi into .tif files---------------------------------------------- jobs_resaving=${job_directory}"czi_resave" # directory .czi resaving resaving=${jobs_resaving}"/resaving.bsh" # script .czi resaving -#--- Resaving ome.tiff into .tif files ----------------------------------------- -jobs_resaving_ometiff=${job_directory}"ometiff_resave" # directory .ome.tiff resaving -resaving_ometiff=${jobs_resaving_ometiff}"/resaving-ometiff.bsh" # script .ome.tiff resaving -#--- Compress dataset;---------------------------------------------------------- -jobs_compress=${job_directory}"compress" # directory .czi to .zip resaving -czi_compress=${jobs_compress}"/for_czi.bsh" # script .czi to .zip resaving -#--- Split channels------------------------------------------------------------- -jobs_split=${job_directory}"split_channels" # directory -split=${jobs_split}"/split.bsh" # script + diff --git a/spim_registration/tools/rename-zeiss-files.sh b/spim_registration/tools/rename-zeiss-files.sh deleted file mode 100755 index b41a96f0d794eeb8109db681f172626e6aa91be3..0000000000000000000000000000000000000000 --- a/spim_registration/tools/rename-zeiss-files.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# path of master file -source master_preprocessing.sh - -# path of source and target files -source_pattern=${image_file_directory}${source_pattern} -target_pattern=${image_file_directory}${target_pattern} - -# ------------------------------------------------------------------------------ - -i=${first_index} -t=${first_timepoint} -t=`printf "%0${pad}d" "${t}"` - -while [ $i -le $last_index ]; do - - for a in "${angles_renaming[@]}"; do - - source=${source_pattern/\{index\}/${i}} - tmp=${target_pattern/\{timepoint\}/${t}} - target=${tmp/\{angle\}/${a}} - - echo ${source} ${target} # displays source file and target file with path - - #mv ${source} ${target} # renames source file into target pattern - cp ${source} ${target} # alternatively copy source file and resave into target pattern - let i=i+1 - - done - let t=t+1 - t=`printf "%0${pad}d" "${t}"` - -done diff --git a/spim_registration/tools/split_channels/create-split-jobs.sh b/spim_registration/tools/split_channels/create-split-jobs.sh deleted file mode 100755 index 1491121f8a77251244c68d2fb5016a269e9ec1db..0000000000000000000000000000000000000000 --- a/spim_registration/tools/split_channels/create-split-jobs.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -source ../master_preprocessing.sh - -mkdir -p ${jobs_split} - -for i in $parallel_timepoints - - do - for a in $angle_prep - - do - job="$jobs_split/split-$i-$a.job" - echo $job - echo "#!/bin/bash" > "$job" - echo "$XVFB_RUN $sysconfcpus $Fiji \ - -Dimage_file_directory=$image_file_directory \ - -Dparallel_timepoints=$i \ - -Dangle_prep=$a \ - -Dpad=$pad \ - -Dtarget_split=$image_file_directory \ - -- --no-splash \ - $split" >> "$job" -chmod a+x "$job" - done -done - diff --git a/spim_registration/tools/split_channels/split.bsh b/spim_registration/tools/split_channels/split.bsh deleted file mode 100755 index e562f2c0a2cd1e7a21f26ec124dda0fd18e80365..0000000000000000000000000000000000000000 --- a/spim_registration/tools/split_channels/split.bsh +++ /dev/null @@ -1,44 +0,0 @@ -import ij.IJ; -import ij.ImagePlus; -import ij.ImageStack; -import java.lang.Runtime; -import java.io.File; -import java.io.FilenameFilter; - - -runtime = Runtime.getRuntime(); - -image_file_directory = System.getProperty( "image_file_directory" ); -int parallel_timepoints = Integer.parseInt( System.getProperty( "parallel_timepoints" ) ); -angle_prep = System.getProperty( "angle_prep" ); -target_split = System.getProperty( "target_split" ); -int pad = Integer.parseInt( System.getProperty( "pad" ) ); - -System.out.println( "directory = " + image_file_directory ); -System.out.println( "timpoint = " + parallel_timepoints ); -System.out.println( "angles = " + angle_prep ); -System.out.println( "target_split = " + target_split ); -System.out.println( "pad = " + pad ); - -//open image - -imp = new ImagePlus( image_file_directory + "spim_TL" + IJ.pad( parallel_timepoints , pad ) + "_Angle" + angle_prep + ".tif" ); -System.out.println( imp.getTitle() ); - -/* split channels */ -stack = imp.getStack(); -for ( c = 0; c < imp.getNChannels(); ++c ) -{ - channelStack = new ImageStack( imp.getWidth(), imp.getHeight() ); - for ( z = 0; z < imp.getNSlices(); ++z ) - channelStack.addSlice( - "", - stack.getProcessor( - imp.getStackIndex( c + 1, z + 1, 1 ) ) ); - impc = new ImagePlus( imp.getTitle() + " #" + ( c + 1 ), channelStack ); - IJ.save( impc, target_split + imp.getTitle().replaceFirst( ".tif$", "_Channel" + ( c ) + ".tif" ) ); -} - -/* shutdown */ -runtime.exit(0); - diff --git a/spim_registration/tools/split_channels/submit-jobs b/spim_registration/tools/split_channels/submit-jobs deleted file mode 100755 index d631b4efa2d22f1174da389ee8da22662df47c55..0000000000000000000000000000000000000000 --- a/spim_registration/tools/split_channels/submit-jobs +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -for file in `ls ${1} | grep ".job$"` -do - bsub -q short -n 3 -R span[hosts=1] -o "out.%J" -e "err.%J" ${1}/$file -done