Pyem & csparc2star.py installation

Posting for forum searchers - pyem & csparc2star.py can now be installed using conda/mamba.

# Regular miniconda.
conda install -c conda-forge pyem
# Miniforge (recommended).
mamba install pyem
7 Likes

Hi DanielAsarnow,
Thanks for the updates. I used another version previously, For the current one, what should I input for “–strip-uid [STRIP_UID]”, I don’t know how to replace the [STRIP_UID], as each micrograph has a specific UID number. Thanks a lot.

Best,

Feng

Please refer to csparc2star.py --help, pasted below.

usage: csparc2star.py [-h] [--movies] [--boxsize BOXSIZE] [--class CLS] [--minphic MINPHIC] [--stack-path STACK_PATH]
                      [--micrograph-path MICROGRAPH_PATH] [--copy-micrograph-coordinates COPY_MICROGRAPH_COORDINATES] [--swapxy]
                      [--noswapxy] [--invertx] [--inverty] [--flipy] [--flipy-pose] [--flipy-ctf] [--cached]
                      [--transform TRANSFORM] [--relion2] [--strip-uid [STRIP_UID]] [--10k] [--loglevel LOGLEVEL]
                      [input ...] output

positional arguments:
  input                 Cryosparc metadata .csv (v0.6.5) or .cs (v2+) files
  output                Output .star file

optional arguments:
  -h, --help            show this help message and exit
  --movies              Write per-movie star files into output directory
  --boxsize BOXSIZE     Cryosparc refinement box size (if different from particles)
  --class CLS           Keep this class in output, may be passed multiple times
  --minphic MINPHIC     Minimum posterior probability for class assignment
  --stack-path STACK_PATH
                        Path to single particle stack
  --micrograph-path MICROGRAPH_PATH
                        Replacement path for micrographs or movies
  --copy-micrograph-coordinates COPY_MICROGRAPH_COORDINATES
                        Source for micrograph paths and particle coordinates (file or quoted glob)
  --swapxy              Swap X and Y axes when converting particle coordinates from normalized to absolute
  --noswapxy            Do not swap X and Y axes when converting particle coordinates
  --invertx             Invert particle coordinate X axis
  --inverty             Invert particle coordinate Y axis
  --flipy               Invert particle Y shifts, angles, defocus angle
  --flipy-pose          Invert particle Y shifts and angles
  --flipy-ctf           Invert particle defocus angle
  --cached              Keep paths from the Cryosparc 2+ cache when merging coordinates
  --transform TRANSFORM
                        Apply rotation matrix or 3x4 rotation plus translation matrix to particles (Numpy format)
  --relion2, -r2        Relion 2 compatible outputs
  --strip-uid [STRIP_UID]
                        Strip all leading UIDs from file names (default) or provide an integer to strip that number of UIDs
                        (starting from the left)
  --10k                 Only read first 10,000 particles for rapid testing.
  --loglevel LOGLEVEL, -l LOGLEVEL
                        Logging level and debug output
1 Like