surforama is a tool for visualizing and annotating membrane meshes. MemBrain-pick works closely with surforama to inspect generated meshes, projected tomogram densities, and manually annotate membrane-associated particles. After prediction, you can also visualize the predicted heatmaps and particle center positions in surforama. This document provides an overview of how to use surforama to inspect membrane containers and manually annotate membrane-associated particles.
If you have generated a membrane containers, e.g. as described in the Data Preparation documentation, or as output of the MemBrain-pick model, you can inspect these in surforama using the following command:
membrain_pick surforama --h5-path <path-to-your-h5-container>
This will automatically start Napari with the membrane meshes and projected tomogram densities loaded. You can then use the Napari GUI to inspect the meshes and densities, and manually annotate membrane-associated particles.
--h5-path
(TEXT, required): Path to the h5 container. [default: None]--tomogram-path
(TEXT): Path to the tomogram to be projected (overwrites the path in the h5 container). [default: None]--normal-offset
(FLOAT): Offset for the normal vectors. [default: 0.0]--point-size
(FLOAT): Size of the points. [default: 5.0]
If you run the command with h5-path
pointing to a directory, all h5 files in that directory will be loaded into surforama.
After loading the membrane container, a screen like the following will appear. You can then visualize the densities stored in the container by changing the selected feature channel in the bottom right corner:
To annotate membrane particles, you should deactivate the "Projections" layer by clicking on the eye icon next to it. This shows the "Surfogram" layer, where you can smoothly change the distance of the normal projection via the slider on the right. Clicking on the "Enable" button on the right will initialize the Points layer on the left, where annotated points will intermediately be stored.
By clicking on positions on the mesh, new points will be added to the Points layer. Once you are done with the annotations, you can save out the positions as a RELION-type .star file by clicking "Save to star file" after specifying the output path.
Important! Make sure to have the "Surforama" layer active when clicking the points, otherwise it will not work.
In case you are not happy with the clicks you made or you would like to correct MemBrain-pick's predictions, you can alter the positions by
- activating the Points layer on the left
- click the selection icon on the top left
- a) drag the point to a new position or b) delete the point by first clicking the point and then clicking the delete button on the top left
In the workflow of MemBrain-pick, you can use the surforama-generated GT files to train your first MemBrain-pick model, as described in the Training documentation.
After running prediction as described in the Prediction documentation, you can inspect the predicted heatmaps and particle center positions in surforama. To do this, you can run the following command:
membrain_pick surforama --h5-path <path-to-your-predicted-h5-container>
This will automatically start Napari with the predicted heatmaps and particle center positions loaded. You can then use the Napari GUI to inspect the heatmaps and particle center positions, and manually alter the positions if needed. By default, the surforama view is loaded together with the predicted positions. If you would like to look at the heatmaps instead of the projected tomogram densities, you can simply un-visualize the "Surfogram" layer to make the "Scores" layer visible:
https://private-user-images.githubusercontent.com/34575029/398803859-0df51395-d939-4b1f-8fcc-75db42865fc5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYxMDEzODEsIm5iZiI6MTczNjEwMTA4MSwicGF0aCI6Ii8zNDU3NTAyOS8zOTg4MDM4NTktMGRmNTEzOTUtZDkzOS00YjFmLThmY2MtNzVkYjQyODY1ZmM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA1VDE4MTgwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkOTMwM2RlMzlmNTY2Mjk2ZWYxMzI2ZDQxOWMyZGEyMjYwMGRlYTJlOGQyMDUwM2RjYTU2ODYyZmEyOTViZGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6cc5AMQlIRSEBeAqS-z6BSCKAH8l4bz_kNw1BcBAzIY If desired, you can now alter the positions of the predicted particles as described in the previous section, and save the altered positions as a RELION-type .star file. With these new positions, you can either train a more refined model or use them for further analysis.