Xmipp2coord: Difference between revisions

From Relion
Jump to navigation Jump to search
(Created page with "#!/usr/bin/env csh # # if ($# == 3 ) then set xmdfile = $1 set tablename = $2 set downsample = $3 relion_star_printtable ${xmdfile} ${tablename} _micrograph _xcoor _ycoor ...")
 
No edit summary
Line 1: Line 1:
<code>
#!/usr/bin/env csh
#!/usr/bin/env csh
#
#
Line 19: Line 20:
  echo "Run this script in the directory where all your mrc micrographs are"
  echo "Run this script in the directory where all your mrc micrographs are"
endif
endif
</code>

Revision as of 12:38, 26 March 2013

  1. !/usr/bin/env csh

if ($# == 3 ) then

set xmdfile = $1
set tablename = $2
set downsample = $3
relion_star_printtable ${xmdfile} ${tablename} _micrograph _xcoor _ycoor | awk -F"/" '{print $NF}' | sort > tt.dat
foreach mic (`cat tt.dat | awk '{print $1}' | uniq`)
  set coordfile=`echo ${mic} | sed 's|.mrc|.coord|'`
  echo "Creating " $coordfile " ... "
  echo "        x         y      density" > ${coordfile}
  grep ${mic} tt.dat | awk -v"down=${downsample}" '{print down*$2, down*$3, "1.0"}' >> ${coordfile}
end
rm -f tt.dat
echo "Done!"

else

echo "Usage: " $0 "<input xmd file> <tablename> <downsamplefactor>"
echo "Run this script in the directory where all your mrc micrographs are"

endif