/usr/bin/relion_star_datablock_ctfdat is in relion-bin+mpi+gui 1.4+dfsg-2+b2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/bin/bash
if [ $# != 0 ]; then
while read line; do
# Get image name from first column
image=`echo $line | awk '{print $1}'`
# Get ctfparam name from second column
ctfparam=`echo $line | awk '{print $2}'`
# Strip directories from ctfparam and remove "_Periodogramavg.ctfparam" to get micrograph name
micro=`echo $ctfparam | awk -F"/" '{print $NF}' | sed 's|_Periodogramavg.ctfparam||'`
# Get metadata from the ctfparam, reverse sign for defocusU, defocusV and Q0
metadata=`awk '{if ($1~"defocus" || $1~"Q0") {printf "%s%s", -$2," "} else if ($1~"sampling" || $1~"K=") {} else {printf "%s%s", $2," "} } END {printf "\n"}' <$ctfparam `
echo $image $micro $metadata
done < $1
else
echo " === Usage: === "
echo " ${0} <xmippctfdatfile> "
echo " "
echo " === Purpose: === "
echo " This (bash) script generates the STAR datablock for all images in an xmipp-format CTFDAT file"
echo " Note that the sign for XMIPP's defocusU, defocusV and Q0 values is reversed "
echo " "
echo " === Example: ==="
echo " ${0} all_images.ctfdat "
fi
|