Make orientational distribution plot.csh: Difference between revisions

From Relion
Jump to navigation Jump to search
(Created page with "<code> #!/usr/bin/env csh set rootname=$1 set iter=$2 set scale_sphere_size = 10 set modelstar=${rootname}_it0${iter}_model.star set samplstar=${rootname}_sampling.star set opt...")
 
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<code>
#!/usr/bin/env csh
#!/usr/bin/env csh
set rootname=$1
set rootname=$1
set iter=$2
set iter=$2
#
 
set scale_sphere_size = 10
set scale_sphere_size = 10
set modelstar=${rootname}_it0${iter}_half1_model.star
 
set samplstar=${rootname}_it0${iter}_sampling.star
set modelstar=${rootname}_it0${iter}_model.star
set optstar=${rootname}_it0${iter}_optimiser.star
set samplstar=${rootname}_sampling.star
#
set optstar=${rootname}_it0${iter}_optimiser.star
set nrclasses = `grep _rlnNrClasses ${modelstar}|awk '{print $2}'`
 
set radius = `grep _rlnParticleDiameter ${optstar} | awk '{print $2/2}'`
set nrclasses = `grep _rlnNrClasses ${modelstar}|awk '{print $2}'`
relion_star_printtable ${samplstar} data_sampling_directions | awk '{i++; print i, $0}' > tmp0
set radius = `grep _rlnParticleDiameter ${optstar} | awk '{print $2/2}'`
set iclass = 0
relion_star_printtable ${samplstar} data_sampling_directions | awk '{i++; print i, $0}' > tmp0
while ($iclass < $nrclasses)
set iclass = 0
  @ iclass++
while ($iclass < $nrclasses)
  relion_star_printtable ${modelstar} data_model_pdf_orient_class_${iclass} | awk '{i++; print i, $0}' > tmp1
@ iclass++
  join tmp0 tmp1 |  awk '{print $1,6,$2,$3,0,0,0,$4}' > tmp2
relion_star_printtable ${modelstar} data_model_pdf_orient_class_${iclass} | awk '{i++; print i, $0}' > tmp1
  set bildfile=${rootname}_it0${iter}_class${iclass}_orientdist.bild
join tmp0 tmp1 |  awk '{print $1,6,$2,$3,0,0,0,$4}' > tmp2
  xmipp_angular_distribution_show -ang tmp2 -bild ${bildfile} -wcol 5 -r ${scale_sphere_size} -R ${radius}
set bildfile=${rootname}_it0${iter}_class${iclass}_orientdist.bild
  echo "written: " ${bildfile}
xmipp_angular_distribution_show -ang tmp2 -bild ${bildfile} -wcol 5 -r ${scale_sphere_size} -R ${radius}
end
echo "written: " ${bildfile}
rm -f tmp0 tmp1 tmp2
end
echo "done! Use UCSF Chimera to visualise the BILD files (you may need to change the origins of your maps in the Volume Viewer window"
rm -f tmp0 tmp1 tmp2
echo "done! Use UCSF Chimera to visualise the BILD files (you may need to change the origins of your maps in the Volume Viewer window"
 
</code>

Latest revision as of 13:26, 13 November 2017

#!/usr/bin/env csh
set rootname=$1
set iter=$2
#
set scale_sphere_size = 10
set modelstar=${rootname}_it0${iter}_half1_model.star
set samplstar=${rootname}_it0${iter}_sampling.star
set optstar=${rootname}_it0${iter}_optimiser.star
# 
set nrclasses = `grep _rlnNrClasses ${modelstar}|awk '{print $2}'`
set radius = `grep _rlnParticleDiameter ${optstar} | awk '{print $2/2}'`
relion_star_printtable ${samplstar} data_sampling_directions | awk '{i++; print i, $0}' > tmp0
set iclass = 0
while ($iclass < $nrclasses)
 @ iclass++
 relion_star_printtable ${modelstar} data_model_pdf_orient_class_${iclass} | awk '{i++; print i, $0}' > tmp1
 join tmp0 tmp1 |  awk '{print $1,6,$2,$3,0,0,0,$4}' > tmp2
 set bildfile=${rootname}_it0${iter}_class${iclass}_orientdist.bild
 xmipp_angular_distribution_show -ang tmp2 -bild ${bildfile} -wcol 5 -r ${scale_sphere_size} -R ${radius}
 echo "written: " ${bildfile}
end
rm -f tmp0 tmp1 tmp2
echo "done! Use UCSF Chimera to visualise the BILD files (you may need to change the origins of your maps in the Volume Viewer window"