A collection of crude scripts and workarounds for CryoEM
plotfsc.py Generates FSC plots in EPS format from the RELION XML files.
python plotfsc.py --i input.xml --o output.eps
rename_image_shift.py will rename movies based on the image shift position from SerialEM mdoc files. Do this when you collect data with SerialEM multishot and forget to check the box to save files with the position in the name.
The safest way to run this is to make a new directory and symlink all the movies and corresponding mdoc files.
python rename_image_shift.py
rsync.py will rsync with -aP options on a loop and can be stopped remotely by adding a file to the destination directory called "stop". The script
assumes you you have ssh keys set up for access without a password.
python rsync.py --u username --i 123.123.123.123 --p /full/path/to/data/directory/ --d /full/path/to/destination/directory/
To kill the script from the remote machine
touch /full/path/to/destination/directory/stop
splitimageshift.py writes out a star file for 9 imageshift groups by searching the rlnMicrographName column for a list of strings. Edit the list in the script to accommodate different image shift patterns
python splitimageshift.py --i particles.star
rln31downgrade.py Converts RELION 3.1+ star files for compatibility with Warp/M. See https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1910&L=CCPEM&P=R321009 for more info.
python rln31downgrade.py --i particles.star
star_editor.py Provides a GUI with a live display for making common modifications to cryo-EM star files such as editing paths, modifying data values, etc. Requires python3 with tkinter. Compatible with X11 forwarding.
python star_editor.py
Relion 3.1 format star files should be used, as Relion 3.0 format is not fully supported. Most operations require a selection of the particles table or optics table from the drop-down menu.
- Provide a string in the search box and click Remove Particles.
- Wildcards can also be used with caution.
- Search can be limited to a specific column by providing the name in the Column Name box.
- Provide the search and replace strings in the text box and click the Search and Replace button.
- Search and replace can be limited to a specific column by providing a Column Name.
- Use wildcards with caution.
- If no column name is specified and
*is used, you may delete more than intended.
- If no column name is specified and
- Provide the column name to operate on in the specified box and the new value or a column name to copy from in the New Value entry.
- If the column specified in Column Name does not already exist, it will be created.
- Provide a column name that doesn't already exist in the table along with a new value.
- Provide a function rather than a single value and check the Function box.
Example:
If rlnCoordinateX needs to be binned by 2, provide the column name and x/2 in the New Value entry. Then, check the Function box and click Update Column Values.
- Searches the entire particle entry for 21 consecutive numbers and removes them.
- Splits a star file into multiple star files based on the shared criteria provided in the Split Column Name.
- Checking the Regroup box will update the
rlnGroupNamecolumn to have consecutive numbering based on the grouping. - Checking the Recombine box will change the
rlnGroupNameand recombine into a single star file.- Note: This functionality may be broken.
