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

Tested and debugged rename-zeiss-files

parent 7e98edc7
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# c=0,1 etc # c=0,1 etc
# spim_TL{tt}_Angle{a}_Channel{c}.tif # spim_TL{tt}_Angle{a}_Channel{c}.tif
#=============================================================================== #===============================================================================
image_file_directory="/projects/pilot_spim/Christopher/Test_pipeline_3.0/czi/" image_file_directory="/projects/pilot_spim/Christopher/test_pipeline/single_channel/resave_test/"
# --- jobs directory ----------------------------------------------------------- # --- jobs directory -----------------------------------------------------------
job_directory="/projects/pilot_spim/Christopher/snakemake-workflows/spim_registration/tools/" job_directory="/projects/pilot_spim/Christopher/snakemake-workflows/spim_registration/tools/"
...@@ -32,17 +32,17 @@ job_directory="/projects/pilot_spim/Christopher/snakemake-workflows/spim_registr ...@@ -32,17 +32,17 @@ job_directory="/projects/pilot_spim/Christopher/snakemake-workflows/spim_registr
# carry the index (0) # carry the index (0)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
pad="3" # for padded zeros pad="2" # for padded zeros
angle_prep="1" # angles format: "1 2 3" angle_prep="1 2 3 4 5" # angles format: "1 2 3"
#--- Renaming ------------------------------------------------------------------ #--- Renaming ------------------------------------------------------------------
first_index="0" # First index of czi files first_index="0" # First index of czi files
last_index="391" # Last index of czi files last_index="9" # Last index of czi files
first_timepoint="0" # Starts with 0 first_timepoint="0" # Starts with 0
angles_renaming=(1 2 3 4 5) # Angles format: (1 2 3) angles_renaming=(1 2 3 4 5) # Angles format: (1 2 3)
source_pattern=2014-10-23_H2A_gsb_G3\(\{index\}\).czi # Name of .czi files source_pattern=2015-02-21_LZ1_Stock68_3\(\{index\}\).czi # Name of .czi files
target_pattern=spim_TL\{timepoint\}_Angle\{angle\}.czi # The output pattern of renaming target_pattern=spim_TL\{timepoint\}_Angle\{angle\}.czi # The output pattern of renaming
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
...@@ -50,7 +50,7 @@ target_pattern=spim_TL\{timepoint\}_Angle\{angle\}.czi # The output pattern of r ...@@ -50,7 +50,7 @@ target_pattern=spim_TL\{timepoint\}_Angle\{angle\}.czi # The output pattern of r
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
XVFB_RUN="/sw/bin/xvfb-run" # virtual frame buffer XVFB_RUN="/sw/bin/xvfb-run" # virtual frame buffer
Fiji_resave="/sw/users/schmied/lifeline/Fiji.app.lifeline2/ImageJ-linux64" # Fiji that works for resaving Fiji_resave="/sw/users/schmied/packages/2014-06-02_Fiji.app_lifeline/ImageJ-linux64" # Fiji that works for resaving
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Pre-processing # Pre-processing
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
......
#!/bin/bash #!/bin/bash
# path of master file # path of master file
source ../master_preprocessing.sh source master_preprocessing.sh
# path of source and target files # path of source and target files
source_pattern=${image_file_directory}${source_pattern} source_pattern=${image_file_directory}${source_pattern}
...@@ -15,19 +15,18 @@ t=`printf "%0${pad}d" "${t}"` ...@@ -15,19 +15,18 @@ t=`printf "%0${pad}d" "${t}"`
while [ $i -le $last_index ]; do while [ $i -le $last_index ]; do
for a in "${angles_renaming[@]}"; do for a in "${angles_renaming[@]}"; do
source=${source_pattern/\{index\}/${i}} source=${source_pattern/\{index\}/${i}}
tmp=${target_pattern/\{timepoint\}/${t}} tmp=${target_pattern/\{timepoint\}/${t}}
target=${tmp/\{angle\}/${a} target=${tmp/\{angle\}/${a}}
echo ${source} ${target} # displays source file and target file with path echo ${source} ${target} # displays source file and target file with path
mv ${source} ${target} # renames source file into target pattern #mv ${source} ${target} # renames source file into target pattern
#cp ${source} ${target} # alternatively copy source file and resave into target pattern cp ${source} ${target} # alternatively copy source file and resave into target pattern
let i=i+1 let i=i+1
done done
t=$(( 10#${t} ))
let t=t+1 let t=t+1
t=`printf "%0${pad}d" "${t}"` t=`printf "%0${pad}d" "${t}"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment