Relion: Refine your volume
- From the .tbl files of the 2 half-steps in the previous step, generate a .star file:
conda activate tomotools python convert_tbl_to_warp.py \ -r $ROOT/warp \ -t1 dynamo/dynamo_project_b4/abp_align_eo/results/ite_0004/averages/refined_table_ref_001_ite_0004.tbl \ -t2 dynamo/dynamo_project_b4/abp_align_eo/results/ite_0004/averages/refined_table_ref_002_ite_0004.tbl \ -w particles_dynamo_b4.star \ -o particles_dynamo_b2.star \ -a $ANGPIX \ -tm dynamo/particles_b4.reextract.doc \ -b 4 # binning of the .tbl files (was bin4)
Extract particles at bin4 for Relion
-
Use this star file to re-extract particles with warp:
# Compute box diameter (floor) BOXDIM=$(awk "BEGIN { print int($ANGPIX_BIN4 * $BOXSIZE) }") # Export particles cd $ROOT/warp WarpTools ts_export_particles \ --settings warp_tiltseries.settings \ --input_star particles_dynamo_b2.star \ --output_star relion5_b4/Extract/bin4_box$BOXSIZE/particles.star \ --coords_angpix $ANGPIX \ --output_angpix $ANGPIX_BIN4 \ --box $BOXSIZE \ --diameter $BOXDIM \ --relative_output_paths \ --2d \ --output_processing relion5_b4/Extract/bin4_box$BOXSIZE/ - To do helical processing, Relion5 expects a
_rnlAngleTiltof 90. The scriptwarp_to_relion5.pyrotates the Euler angle of the subtomograms such that_rnlAngleTiltis 90. Also, it converts the coordinates to be compatible with Relion5 (in Angstroms and measured from the center of the tomogram).cd $REPOSITORY python warp_to_relion5.py \ --relionroot $ROOT/warp/relion5_b4 \ --prestar ../particles_dynamo_b2.star \ --poststar Extract/bin4_box$BOXSIZE/particles.star \ --tomo Extract/bin4_box$BOXSIZE/particles_tomograms.star \ --out Extract/bin4_box$BOXSIZE/particles_relion5_tiltprior90.star \ --bin 4 \ --tiltprior90 - Rescale one of the two halfmaps from dynamo bin4 to bin2.
First, convert one of the halfmaps to an mrc file:
cd $ROOT/warp ANGPIX_BIN4=$(echo "$ANGPIX * 4" | bc) e2proc3d.py --mult=-1 dynamo/dynamo_project_b4/abp_align_eo/results/ite_0004/averages/average_ref_001_ite_0004.em dynamo_bin4_ite4.mrc relion_image_handler --i dynamo_bin4_ite4.mrc --o dynamo_bin4_ite4.mrc --force_header_angpix $ANGPIX_BIN4Then, search the symmetry:
relion_helix_toolbox --i dynamo_bin4_ite4.mrc --twist_min 1 --twist_max 1.9 --rise_min 4.6 --rise_max 4.8 --z_percentage 0.3 --search --cyl_outer_diameter 200 --angpix $ANGPIX_BIN4Below, set the twist and rise to the optima found above:
# Apply symmetry relion_helix_toolbox --i dynamo_bin4_ite4.mrc --twist 1.09 --rise 4.8 --z_percentage 0.3 --impose --cyl_outer_diameter 180 --angpix $ANGPIX_BIN4 --o dynamo_bin4_ite4_sym.mrcThe output is already at bin4.
Extract particles at bin2
-
Use this star file to re-extract particles with warp:
# Compute box diameter (floor) BOXDIM=$(awk "BEGIN { print int($ANGPIX_BIN2 * $BOXSIZE) }") # Export particles cd $ROOT/warp WarpTools ts_export_particles \ --settings warp_tiltseries.settings \ --input_star particles_dynamo_b2.star \ --output_star relion5_b2/Extract/bin2_box$BOXSIZE/particles.star \ --coords_angpix $ANGPIX \ --output_angpix $ANGPIX_BIN2 \ --box $BOXSIZE \ --diameter $BOXDIM \ --relative_output_paths \ --2d \ --output_processing relion5_b2/Extract/bin2_box$BOXSIZE/ - To do helical processing, Relion5 expects a
_rnlAngleTiltof 90. The scriptwarp_to_relion5.pyrotates the Euler angle of the subtomograms such that_rnlAngleTiltis 90. Also, it converts the coordinates to be compatible with Relion5 (in Angstroms and measured from the center of the tomogram).cd $REPOSITORY python warp_to_relion5.py \ --relionroot $ROOT/warp/relion5_b2 \ --warp ../particles_dynamo_b2.star \ --relion Extract/bin2_box$BOXSIZE/particles.star \ --tomo Extract/bin2_box$BOXSIZE/particles_tomograms.star \ --out Extract/bin2_box$BOXSIZE/particles_rot90.star - Rescale one of the two halfmaps from dynamo bin4 to bin2.
First, convert one of the halfmaps to an mrc file:
cd $ROOT/warp ANGPIX_BIN4=$(echo "$ANGPIX * 4" | bc) ANGPIX_BIN2=$(echo "$ANGPIX * 2" | bc) e2proc3d.py --mult=-1 dynamo/dynamo_project_b4/abp_align_eo/results/ite_0004/averages/average_ref_001_ite_0004.em dynamo_bin4_ite4.mrc relion_image_handler --i dynamo_bin4_ite4.mrc --o dynamo_bin4_ite4.mrc --force_header_angpix $ANGPIX_BIN4relion_helix_toolbox --i dynamo_bin4_ite4.mrc --twist_min 1 --twist_max 1.9 --rise_min 4.6 --rise_max 4.8 --z_percentage 0.3 --search --cyl_outer_diameter 200 --angpix $ANGPIX_BIN4Below, set the twist and rise to the optima found above:
# Apply symmetry relion_helix_toolbox --i dynamo_bin4_ite4.mrc --twist 1.09 --rise 4.8 --z_percentage 0.3 --impose --cyl_outer_diameter 180 --angpix $ANGPIX_BIN4 --o dynamo_bin4_ite4_sym.mrc# Rescale to the new pixel size relion_image_handler --i dynamo_bin4_ite4_sym.mrc --o relion5_b2/dynamo_bin2_ite4_sym_box$BOXSIZE.mrc --angpix $ANGPIX_BIN4 --rescale_angpix $ANGPIX_BIN2 --new_box $BOXSIZE --force_header_angpix $ANGPIX_BIN2
Extract particles at bin 1
-
Use this star file to re-extract particles with warp:
# Set boxsize for extraction at bin 1 BOXSIZE_BIN1=128 BOXDIM=$(awk "BEGIN { print int($ANGPIX * $BOXSIZE_BIN1) }") # Export particles cd $ROOT/warp WarpTools ts_export_particles \ --settings warp_tiltseries.settings \ --input_star particles_dynamo_b2.star \ --output_star relion5_b1/Extract/bin1_box$BOXSIZE_BIN1/particles.star \ --coords_angpix $ANGPIX \ --output_angpix $ANGPIX \ --box $BOXSIZE_BIN1 \ --diameter $BOXDIM \ --relative_output_paths \ --2d \ --output_processing relion5_b1/Extract/bin1_box$BOXSIZE_BIN1/ - To do helical processing, Relion5 expects a
_rnlAngleTiltof 90. The scriptwarp_to_relion5.pyrotates the Euler angle of the subtomograms such that_rnlAngleTiltis 90. Also, it converts the coordinates to be compatible with Relion5 (in Angstroms and measured from the center of the tomogram).cd $REPOSITORY python warp_to_relion5.py \ --relionroot $ROOT/warp/relion5_b1 \ --warp ../particles_dynamo_b2.star \ --relion Extract/bin1_box$BOXSIZE_BIN1/particles.star \ --tomo Extract/bin1_box$BOXSIZE_BIN1/particles_tomograms.star \ --out Extract/bin1_box$BOXSIZE_BIN1/particles_rot90.star - Rescale one of the two halfmaps from dynamo bin4 to bin1.
First, convert one of the halfmaps to an mrc file:
cd $ROOT/warp ANGPIX_BIN4=$(echo "$ANGPIX * 4" | bc) # Rescale to the new pixel size relion_image_handler --i dynamo_bin4_ite4_sym.mrc --o relion5_b1/dynamo_bin1_ite4_sym_box$BOXSIZE_BIN1.mrc --angpix $ANGPIX_BIN4 --rescale_angpix $ANGPIX --new_box $BOXSIZE_BIN1 --force_header_angpix $ANGPIX
Generate a mask
relion_helix_toolbox --o mask.mrc --cyl_outer_diameter 200 --angpix 7.92 --boxdim 64 --sphere_percentage 0.6 --cylinder