4d — Export fibril coordinates

Export scripts · 4d User Manual

← Back to Export, Stats & Notifications

Export picked fibril coordinates

This script (export/FIBRILS/20_ExportFibrils.script) takes the amyloid-fibril coordinates you picked in 4d and writes them, together with the microscope metadata, into a folder structure that RELION can import directly for downstream single-particle / helical processing. It is part of the Export section and is used in the Fibril picking project mode after the Fibrils scripts have picked and curated the fibrils.

Purpose

For every image in the project it collects the picked fibril start/end coordinates (from the fibrils*.star files), converts them into per-micrograph RELION coordinate files, and builds the two RELION project files that tie the micrographs, their optics, and their coordinates together. The result is a ready-to-open RELION picking project.

Parameters

ParameterRole
export_basedirThe directory the export is written into (absolute path starting with /, or a relative path). Created if it does not exist.
export_micrograph_directoryThe directory where RELION will find the micrographs — used as the path prefix of each _rlnMicrographName in the exported STAR files.
KVAccelerating voltage (kV), written as _rlnVoltage.
CSSpherical aberration Cs (mm), written as _rlnSphericalAberration.
pixelsizePixel size (Å), written as the original and micrograph pixel size in the optics group.
export_fibrils_group1export_fibrils_group5Five y/n toggles selecting which fibril categories to export — group 1 = fibrils.star, group 2 = fibrils2.star, …, group 5 = fibrils5.star. Tick the categories you curated.
The amplitude contrast is fixed at 0.1 and the MTF is referenced as mtf_falcon4EC_300kV.star in the optics group; adjust the produced micrographs_selected.star if your detector differs.

Algorithm

  1. Ensures export_basedir exists and creates a fresh STARFILES/ subdirectory inside it (any previous one is removed).
  2. Writes the RELION optics + micrograph list header into micrographs_selected.star (a data_optics block with one optics group carrying the pixel size, voltage, Cs and amplitude contrast, followed by an empty data_micrographs loop), and an empty manualpick.star (data_coordinate_files loop).
  3. Reads the project's list of image directories (4d_merge_dirfile.dat) and loops over each. For every directory it locates the image's log file and extracts the original micrograph filename from the import_rawstack entry (directories with no log or no name are skipped with a warning).
  4. For each enabled fibril category (1–5), if that fibrils*.star file exists and contains coordinates (more than the 11 header lines), it:
    • appends the micrograph to micrographs_selected.star and manualpick.star, and
    • copies the fibril coordinates into a per-micrograph file <name>_manualpick.star in STARFILES/ (appending, so several categories merge into one coordinate file per micrograph).
    Empty or header-only category files are skipped.
  5. Reports progress and prints the full export path when finished.

Results

Data written — a RELION-ready folder under export_basedir:

All three (the two STAR files and the STARFILES/ directory) are registered as important results, so they appear in the Manual Processing Results / Images panel. Point RELION's manual picking / import at micrographs_selected.star to continue processing.