STAR Viewer
A lightweight, dependency-free VS Code extension for reading RELION and cryo-EM STAR files.
STAR Viewer makes wide, whitespace-delimited particle tables understandable without changing their contents. Keep working in the normal text editor and place the cursor over a value to see its full _rln... column name, data block, and row in both the hover popup and status bar.
Features
- STAR/RELION syntax highlighting
- Outline for
data_ blocks, loop_ tables, tags, and scalar items
- Hover a loop value to see its data block, row, and complete field name
- Follow the current cell continuously in the VS Code status bar
- Read-only table preview with block selection, filtering, numeric-aware sorting, infinite scrolling, and column hiding
- Full-file hover and status-bar column identification, including rows beyond large-table preview boundaries
Usage
Open any .star file. STAR Viewer activates automatically.
- Place the cursor over a value in a
loop_ table to identify its column.
- Open the VS Code Outline view to navigate data blocks, loops, and fields.
- Click the table icon in the editor title, or run STAR: Open Table Preview from the Command Palette, for a read-only table view.
Development
- Open this directory in VS Code.
- Press
F5 and select Run STAR Viewer Extension.
- In the Extension Development Host, open
examples/relion-particles.star.
- Click the table icon in the editor title, or run STAR: Open Table Preview from the Command Palette.
Run the parser tests with:
npm test
Current scope
The extension is intentionally read-only. It supports the common whitespace-delimited RELION layout, comments, quoted values, multiple data blocks, loops, and rows wrapped across lines. Full CIF semicolon-delimited multiline values and save-frame editing are not yet exposed in the table viewer.
Package a VSIX
npm install
npm run package:vsix
Then install the generated .vsix with Extensions: Install from VSIX....
License
MIT