Skip to content

Convert cisTEM Frealign CTFFIND4

Daniel Asarnow edited this page Jun 14, 2024 · 1 revision

Table of Contents

Frealign

The program par2star.py converts .par files from cisTEM, FrealignX, or Frealign 9 to Relion .star files.

During 3D classification Frealign maintains a .par file for each class (i.e. particles have unique alignments and occupancies per-class). You can pass several .par files to par2star.py using a wildcard, in which case the alignment from the highest occupancy class will be used.

usage: par2star.py [-h] [--merge MERGE] [--stack STACK] [--apix APIX] [--ac AC] [--cs CS] [--voltage VOLTAGE] [--min-occ MIN_OCC]
                   [--min-score MIN_SCORE] [--class CLS] [--relion2] [--revert-original] [--invert-eulers] [--loglevel LOGLEVEL]
                   [input ...] output

positional arguments:
  input                 Input Frealign .par file
  output                Output Relion .star file

options:
  -h, --help            show this help message and exit
  --merge MERGE, -m MERGE
                        Merge this .star file
  --stack STACK, -s STACK
                        Particle stack path
  --apix APIX, --angpix APIX
                        Pixel size in Angstroms
  --ac AC, -ac AC       Amplitude contrast
  --cs CS, -cs CS       Spherical abberation
  --voltage VOLTAGE, --kv VOLTAGE, -kv VOLTAGE
                        Acceleration voltage (kV)
  --min-occ MIN_OCC     Minimum occupancy for inclusion in output
  --min-score MIN_SCORE
                        Minimum score (or percentile if < 1) for inclusion in output
  --class CLS, -c CLS   Classes to preserve in output
  --relion2, -r2        Write Relion2 compatible STAR file
  --revert-original, -v
                        Swap ImageName and ImageOriginalName before writing
  --invert-eulers       Invert Euler angles (generally unnecessary)
  --loglevel LOGLEVEL, -l LOGLEVEL
                        Logging level and debug output

CTFFIND4

The program ctf2star.py combines the CTFFIND4 output text files for multiple micrographs into a micrograph .star file for Relion.

usage: par2star.py [-h] [--merge MERGE] [--stack STACK] [--apix APIX] [--ac AC] [--cs CS] [--voltage VOLTAGE] [--min-occ MIN_OCC]
                   [--min-score MIN_SCORE] [--class CLS] [--relion2] [--revert-original] [--invert-eulers] [--loglevel LOGLEVEL]
                   [input ...] output

positional arguments:
  input                 Input Frealign .par file
  output                Output Relion .star file

options:
  -h, --help            show this help message and exit
  --merge MERGE, -m MERGE
                        Merge this .star file
  --stack STACK, -s STACK
                        Particle stack path
  --apix APIX, --angpix APIX
                        Pixel size in Angstroms
  --ac AC, -ac AC       Amplitude contrast
  --cs CS, -cs CS       Spherical abberation
  --voltage VOLTAGE, --kv VOLTAGE, -kv VOLTAGE
                        Acceleration voltage (kV)
  --min-occ MIN_OCC     Minimum occupancy for inclusion in output
  --min-score MIN_SCORE
                        Minimum score (or percentile if < 1) for inclusion in output
  --class CLS, -c CLS   Classes to preserve in output
  --relion2, -r2        Write Relion2 compatible STAR file
  --revert-original, -v
                        Swap ImageName and ImageOriginalName before writing
  --invert-eulers       Invert Euler angles (generally unnecessary)
  --loglevel LOGLEVEL, -l LOGLEVEL
                        Logging level and debug output
(pyem-build) da@idunn pyem % ctf2star.py --help
usage: ctf2star.py [-h] [--path PATH] [--no-sort] [--apix APIX] [input ...] output

positional arguments:
  input
  output

options:
  -h, --help            show this help message and exit
  --path PATH, -p PATH  New path prepended to micrograph basenames
  --no-sort, -n         Preserve input filename order
  --apix APIX           Override pixel size (Angstroms)

Clone this wiki locally