Xmipp2coord: Difference between revisions
Jump to navigation
Jump to search
(→Notes) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
#!/usr/bin/env csh | #!/usr/bin/env csh | ||
# | # | ||
Line 12: | Line 11: | ||
echo "Creating " $coordfile " ... " | echo "Creating " $coordfile " ... " | ||
echo " x y density" > ${coordfile} | echo " x y density" > ${coordfile} | ||
grep ${mic} tt.dat | awk -v"down=${downsample}" '{ | grep ${mic} tt.dat | awk -v"down=${downsample}" '{x=down*$2; y=down*$3; printf "%10i%10i%12s\n", x, y, "1.0"}' >> ${coordfile} | ||
end | end | ||
rm -f tt.dat | rm -f tt.dat | ||
Line 20: | Line 19: | ||
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 | ||
=== Notes === | === Notes === | ||
* The tablename is the name that XMIPP3 has given to the STAR-file table with all the images, e.g. data_noname or data_class000001_images. | |||
* The downsample factor is the one you used in XMIPP3 to extract your particles. | |||
* If you run this script in the Micrographs directory, the coordinate files will already be in their correct position. |
Latest revision as of 13:25, 13 November 2017
#!/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}" '{x=down*$2; y=down*$3; printf "%10i%10i%12s\n", x, y, "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
Notes
- The tablename is the name that XMIPP3 has given to the STAR-file table with all the images, e.g. data_noname or data_class000001_images.
- The downsample factor is the one you used in XMIPP3 to extract your particles.
- If you run this script in the Micrographs directory, the coordinate files will already be in their correct position.