#!/bin/tcsh -f ####################################################################### ## Usage: Frop_dm4Stk.sc > log & ## ##Converts projections of K2 data from dm4 to bin2-mrc format (stack) ##and further to motion corrected mrc projections ##(using motioncorr by Yifan Cheng Lab). ##The script also uses raw2mrc from EMAN. ## ##This script and Frop_dm4Stk.cpp is written by Teru Nakagawa (Aug 5th 2014) #### Variables ######################################################## set INPUT_FILE_ROOT = VacA665_apol_grid37_1_ set first = 101 # assumes that odd numbered images are dm4 stacks set last = 463 set slices = 30 #total number of slices in stack ####################################################################### set Frop_dm4stk_DIR = /home/ohimd/test/Frop_dm4Stk set raw2mrc_DIR = /programs/x86_64-linux/eman/1.9/bin/raw2mrc set motioncorr_DIR = /home/ohimd/test/motioncorr while ($first <= ${last}) set imnum = `echo $first | awk '{printf("%04d",$1)}'` #run Frop_dm4Stk ${Frop_dm4stk_DIR} ${INPUT_FILE_ROOT}${imnum}.dm4 ${slices} ${INPUT_FILE_ROOT}${imnum}.raw #run raw2mrc (EMAN) ${raw2mrc_DIR} ${INPUT_FILE_ROOT}${imnum}.raw ${INPUT_FILE_ROOT}${imnum}.mrc size=3710,3710,${slices} type=float rm -f ${INPUT_FILE_ROOT}${imnum}.raw #run motioncorr ${motioncorr_DIR} ${INPUT_FILE_ROOT}${imnum}.mrc -fod 4 printf "\n Frop_dm4stk -> raw2mrc -> motioncorr: converted image ${INPUT_FILE_ROOT}${imnum}.dm4\n" @ first++ @ first++ end