Services for CryoEM processing
Project description
cryoem-services
Services and configuration for cryo-EM pipelines.
This package consists of a number of services to process cryo-EM micrographs, both for single particle analysis and tomography, using a range of commonly used cryo-EM processing software. These services can be run independently to process data, or as part of a wider structure for performing live analysis during microscope collection. For live analysis, this package integrates with a package for transferring and monitoring collected data, Murfey, and a database for storing processing outcomes, ISPyB.
To run these services the software executables being called must be installed. These do not come with this package.
Tomography processing
The tomography processing pipeline consists of:
- Motion correction
- CTF estimation
- Tomogram alignment
- Tomogram denoising using Topaz
- Segmentation using membrain-seg
The results of this processing can be opened and continued using Relion 5.0.
Single particle analysis
The single particle analysis pipeline produces a project that can be opened and continued using CCP-EM doppio or Relion.
The processing pipeline consists of:
- Motion correction
- CTF estimation
- Particle picking
- (Optionally) Ice thickness estimation
- Particle extraction and rebatching
- 2D classification using Relion
- Automated 2D class selection using Relion
- 3D classification using Relion
- 3D Refinement and post-processing
- BFactor estimation by refinement with varying particle count
Services currently available
The following services are provided for running the pipelines:
- Utility services:
- ClusterSubmission: Submits wrapper scripts to an HPC cluster
- EMISPyB: Inserts results into an ISPyB database
- Images: Creates thumbnail images for viewing processing outcomes
- NodeCreator: Creates Relion project files for the services run
- ProcessRecipe: Converts recipes into messages suitable for processing services
- Processing services:
- BFactor: Performs the setup for 3D refinement with varying particle count
- CrYOLO: Particle picking on micrographs using crYOLO
- CTFFind: CTF estimation on micrographs using CTFFIND4
- DenoiseSlurm: Tomogram denoising, submitted to a slurm HPC cluster, using Topaz
- Extract: Extracts picked particles from micrographs
- ExtractClass: Extracts particles from a given 3D class
- IceBreaker: Ice thickness estimation with IceBreaker
- MembrainSeg: Tomogram segmentation, submitted to a slurm HPC cluster, using membrain-seg
- MotionCorr: Motion correction of micrographs using MotionCor2 or Relion, optionally submitted to a slurm HPC cluster
- PostProcess: Post-processing of 3D refinements using Relion
- SelectClasses: Runs automated 2D class selection using Relion and re-batches the particles from these classes
- SelectParticles: Creates files listing batches of extracted particles
- TomoAlign: Tomogram reconstruction from a list of micrographs using imod and AreTomo2
- TomoAlignSlurm: Tomogram alignment processing submitted to a slurm HPC cluster
There are also three wrapper scripts that can be run on an HPC cluster using the ClusterSubmission service. These perform 2D classification, 3D classification and 3D refinement using Relion.
Running services
The services in this package are run using
python-workflows.
They consume messages off a RabbitMQ
instance and processing happens in sequences defined by the recipes in the recipes folder.
To start a service run the cryoemservices.service command and specify the service name.
For example, to start a motion correction service:
$ cryoemservices.service -s MotionCorr -c config_file.yaml
The configuration file should contain the following:
rabbitmq_credentials: <file with connection credentials to rabbitmq>
recipe_directory: <directory containing the recipes to run>
ispyb_credentials: <(Optionally) file with credentials for an ispyb database>
slurm_credentials:
default: <(Optionally) credentials for a slurm RestAPI>
graylog_host: <(Optionally) the name of a graylog instance>
graylog_port: <(Optionally) the port used by graylog>
Once started, these services will initialise and then wait for messages to be sent to them.
Messages are sent through a message broker,
currently RabbitMQ is supported using pika transport in python-workflows.
Individual processing stages can be run by sending a dictionary of the parameters,
but the processing pipelines are designed to run through recipes.
A recipe is a specication of a series of steps to carry out,
and how these steps interact with each other.
Recipes for the current processing pipelines are provided in the recipes folder.
To run a recipe in python a dictionary needs to be provided consisting of the recipe name and the parameters expected by the recipe. The following snippet shows an example of the setup needed. This will send a message to a running ProcessRecipe service which prepares the recipe for the processing services.
import workflows.transport.pika_transport as pt
example_message = {
"recipes": ["em-tomo-align"],
"parameters": {
"path_pattern": "micrograph_*.mrc",
"pix_size": "1",
...
},
}
transport = pt.PikaTransport()
transport.connect()
transport.send("processing_recipe", example_message)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cryoemservices-1.2.4.tar.gz.
File metadata
- Download URL: cryoemservices-1.2.4.tar.gz
- Upload date:
- Size: 132.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
573c2defced09e3064f5e120adab8699be1d51529fc216dc1c2a02c26be271f0
|
|
| MD5 |
460da89b5ba237b3424d1dd990c8e656
|
|
| BLAKE2b-256 |
909b3cea12e4f490c4d1dbb3ebc77b2432c416b497978d3e742ad4cbfd0818bd
|
Provenance
The following attestation bundles were made for cryoemservices-1.2.4.tar.gz:
Publisher:
publish-version.yml on DiamondLightSource/cryoem-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryoemservices-1.2.4.tar.gz -
Subject digest:
573c2defced09e3064f5e120adab8699be1d51529fc216dc1c2a02c26be271f0 - Sigstore transparency entry: 263328491
- Sigstore integration time:
-
Permalink:
DiamondLightSource/cryoem-services@dec8ecb599f2dc3cb6a47d17ca7736ef9aced979 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-version.yml@dec8ecb599f2dc3cb6a47d17ca7736ef9aced979 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cryoemservices-1.2.4-py3-none-any.whl.
File metadata
- Download URL: cryoemservices-1.2.4-py3-none-any.whl
- Upload date:
- Size: 170.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d04f0122a47e0044fcf9acd4bea084c6e70f2adf7d37da570c8c43ee3307fb62
|
|
| MD5 |
6319fa41bbb8c9559435eaf649b9bb55
|
|
| BLAKE2b-256 |
f23bbeb0a9cef112dd66add7f298f7893836f77300c5a17bef54ad80bb187d9c
|
Provenance
The following attestation bundles were made for cryoemservices-1.2.4-py3-none-any.whl:
Publisher:
publish-version.yml on DiamondLightSource/cryoem-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cryoemservices-1.2.4-py3-none-any.whl -
Subject digest:
d04f0122a47e0044fcf9acd4bea084c6e70f2adf7d37da570c8c43ee3307fb62 - Sigstore transparency entry: 263328494
- Sigstore integration time:
-
Permalink:
DiamondLightSource/cryoem-services@dec8ecb599f2dc3cb6a47d17ca7736ef9aced979 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DiamondLightSource
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-version.yml@dec8ecb599f2dc3cb6a47d17ca7736ef9aced979 -
Trigger Event:
push
-
Statement type: