Skip to content

Commit e591696

Browse files
authored
Merge pull request #51 from WEHI-ResearchComputing/develop
Bug fixes for RELION import, updates to documentation
2 parents ed0f519 + 0070894 commit e591696

13 files changed

Lines changed: 176 additions & 81 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ RUN python -m pip install --no-cache-dir --no-cache /opt/PartiNet
88

99
LABEL AUTHORS Mihin Perera, Edward Yang, Julie Iskander
1010
LABEL MAINTAINERS Mihin Perera, Edward Yang, Julie Iskander
11-
LABEL VERSION v0.2.0
11+
LABEL VERSION v1.0.1

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# PartiNet 🔬
1+
# PartiNet
2+
3+
![PartiNet RMSD](docs/static/img/partinet_RMSD.png)
24

35
PartiNet is a three-stage pipeline for automated particle picking in cryo-EM micrographs, combining advanced denoising with state-of-the-art deep learning detection.
46

@@ -9,12 +11,12 @@ Use our pretrained model at [Model Weights](https://huggingface.co/MihinP/PartiN
911

1012
## Features
1113

12-
- 🧹 Heuristic denoising for improved signal-to-noise ratio
13-
- 🎯 Dynamic deep learning particle detection
14-
- Multi-GPU support for faster processing
15-
- 🔄 Seamless integration with cryoSPARC and RELION workflows
16-
- 📊 Confidence-based particle filtering
17-
- 🖼️ Visual detection validation
14+
- Heuristic denoising for improved signal-to-noise ratio
15+
- Dynamic deep learning particle detection
16+
- Multi-GPU support for faster processing
17+
- Seamless integration with cryoSPARC and RELION workflows
18+
- Confidence-based particle filtering
19+
- Visual detection validation
1820

1921
## Prerequisites
2022

@@ -49,12 +51,12 @@ docker run --gpus all -v /path/to/your/data:/data \
4951

5052
```
5153
project_directory/
52-
├── motion_corrected/ # 📁 Input micrographs
53-
├── denoised/ # 🧹 Denoised outputs
54-
├── exp/ # 🎯 Detection results
55-
│ ├── labels/ # 📋 Coordinates
56-
│ └── ... # 🖼️ Visualizations
57-
└── partinet_particles.star # Final output
54+
├── motion_corrected/ # Input micrographs
55+
├── denoised/ # Denoised outputs
56+
├── exp/ # Detection results
57+
│ ├── labels/ # Coordinates
58+
│ └── ... # Visualizations
59+
└── partinet_particles.star # Final output
5860
```
5961

6062
## Pipeline Stages
@@ -94,7 +96,8 @@ partinet star \
9496
- `*.png`: Visualization overlays
9597

9698
3. **STAR File** (`partinet_particles.star`)
97-
- Ready for RELION processing
99+
- Ready for CryoSPARC processing
100+
- Additional commands available for RELION compatible output
98101

99102
## Advanced Usage
100103

@@ -145,3 +148,5 @@ Citation information will be added upon publication
145148
For issues and questions:
146149
- Open an [Issue](https://github.com/WEHI-ResearchComputing/PartiNet/issues)
147150
- Check existing [Discussions](https://github.com/WEHI-ResearchComputing/PartiNet/discussions)
151+
152+

Singularity

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ from: python:3.9.19-slim-bookworm
1818
%labels
1919
AUTHORS Mihin Perera, Edward Yang, Julie Iskander
2020
MAINTAINERS Mihin Perera, Edward Yang, Julie Iskander
21-
VERSION v1.0.0
21+
VERSION v1.0.1

docs/docs/getting-started.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ PartiNet expects and creates the following directory structure:
2020

2121
```
2222
project_directory/
23-
├── motion_corrected/ # 📁 Your input micrographs
23+
├── motion_corrected/ # Your soft-linked input micrographs
2424
│ ├── micrograph1.mrc
2525
│ ├── micrograph2.mrc
2626
│ └── ...
27-
├── denoised/ # 🧹 Created by denoise stage
27+
├── denoised/ # Created by denoise stage
2828
│ ├── micrograph1.mrc
2929
│ ├── micrograph2.mrc
3030
│ └── ...
31-
├── exp/ # 🎯 Created by detect stage
32-
│ ├── labels/ # 📋 Detection coordinates
31+
├── exp/ # Created by detect stage
32+
│ ├── labels/ # Detection coordinates (YOLO format)
3333
│ │ ├── micrograph1.txt
3434
│ │ ├── micrograph2.txt
3535
│ │ └── ...
36-
│ ├── micrograph1.png # 🖼️ Micrographs with detections drawn
36+
│ ├── micrograph1.png # Micrographs with detections drawn
3737
│ ├── micrograph2.
3838
│ └── ...
39-
└── partinet_particles.star # ⭐ Final STAR file (created by star stage)
39+
└── partinet_particles.star # CryoSPARC-style STAR file (created by star stage)
4040
```
4141

4242
**Pipeline Flow:**

docs/docs/intro.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,14 @@ The final stage prepares particle data for further processing and provides repor
3232
PartiNet is ideal for:
3333
- Identifying rare views
3434
- Picking on heterogeneous datasets
35-
- Reporting on particle populations
35+
- High speed picking
3636

3737
## Next Steps
3838

3939
- **New to PartiNet?** Start with [Installation](installation.md) to get up and running
4040
- **Ready to begin?** Follow our [Getting Started](getting-started.md) guide for your first analysis
4141
- **Need specific details?** Check the individual stage documentation: [Denoise](stages/denoise.md), [Detect](stages/detect.md), [Star](stages/star.md)
4242

43-
<!-- ## Getting Help
43+
## Getting Help
4444

45-
If you encounter issues or need assistance:
46-
- Check the [Troubleshooting](reference/troubleshooting.md) guide
47-
- Review the complete [CLI Reference](reference/cli-reference.md)
48-
- Look at our [Examples](examples/) for common use cases -->
45+
If you encounter issues or need assistance please raise an issue on the GitHub

docs/docs/stages/denoise.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,16 @@ mkdir motion_corrected
6969
**From CryoSPARC:**
7070
```shell
7171
# Using symbolic links (faster, saves space)
72-
ln -s /path/to/cryosparc/project/job_number/motioncorrected/*_fractions_patch_aligned.mrc motion_corrected/
72+
ln -s /path/to/cryosparc/project/JXXX/motioncorrected/*_fractions_patch_aligned.mrc motion_corrected/
7373

7474
# Using rsync (copies files)
75-
rsync /path/to/cryosparc/project/job_number/motioncorrected/*_fractions_patch_aligned.mrc motion_corrected/
75+
rsync /path/to/cryosparc/project/JXXX/motioncorrected/*_fractions_patch_aligned.mrc motion_corrected/
7676
```
7777

7878
**From RELION:**
7979
```shell
8080
# Link motion-corrected micrographs
81-
ln -s /path/to/relion/project/MotionCorr/job_number/Micrographs/*.mrc motion_corrected/
81+
ln -s /path/to/relion/project/MotionCorr/jobXXX/*.mrc motion_corrected/
8282
```
8383

8484
### 3. Run Denoising
@@ -166,7 +166,7 @@ partinet denoise \
166166

167167

168168
### Different Output Formats
169-
By default PartiNet outputs denoised images in `png` format. This is necessary for compatibility with the detection architecture. `png` is a lossless compression, however micrographs are normalised from 32 bit depth `mrc` files to 8 bit `png`. `jpg` is also available (eg for making figures) but is not recommended for use due to lossy compression.
169+
By default PartiNet outputs denoised images in `png` format. This is necessary for compatibility with the detection architecture. `png` is a lossless compression, however micrographs are normalised from 32 bit depth `mrc` files to 8 bit `png`. `jpg` is also available (as a legacy format) but is not recommended for use due to lossy compression.
170170

171171
```shell
172172
# JPEG format (smaller file size, lossy compression)

docs/docs/stages/star.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,32 @@ Choose your confidence threshold based on:
8181
- Downstream processing requirements
8282
- Balance between particle quantity and quality
8383

84-
## Output
84+
## CryoSPARC Output
8585

86-
The command generates a STAR file containing:
86+
The command generates a STAR file compatible with CryoSPARC containing:
8787
- Particle coordinates (X, Y positions)
8888
- Corresponding micrograph paths
8989

90+
## RELION output
91+
92+
Use `--relion` and `--relion-project-dir` to generate RELION-compatible STAR outputs under `<relion_project>/partinet`:
93+
94+
- Micrograph manifest: `<relion_project>/partinet/pick.star`
95+
- Per-micrograph coordinates: `<relion_project>/partinet/movies/<micrograph_basename>.star`
96+
97+
Example:
98+
99+
```bash
100+
partinet star \
101+
--labels /data/partinet_picking/exp/labels \
102+
--images /data/partinet_picking/denoised \
103+
--output /data/partinet_picking/output.star \
104+
--conf 0.2 \
105+
--relion \
106+
--relion-project-dir /data/relion/EMPIAR-10089 \
107+
--mrc-prefix MotionCorr/job003/movies
108+
```
109+
90110

91111
## Next Steps
92112

@@ -96,8 +116,10 @@ After generating your STAR file, you can:
96116

97117
:::warning
98118

99-
PartiNet Denoise flips micrographs in the y-axis due to matrix transpose operations. If you denoised micrographs in PartiNet ensure that when you import and extract particle coordinates that you toggle `Flip in y` in CryoSPARC or similar in RELION prior to particle extraction.
119+
If you are using PartiNet v1.0.0, the Denoise flips micrographs in the y-axis due to matrix transpose operations. If you denoised micrographs in PartiNet ensure that when you import and extract particle coordinates that you toggle `Flip in y` in CryoSPARC prior to particle extraction. This has been fixed in v1.0.1+. You can check your version with `partinet --help`
100120

101121
:::
102122

103123

124+
125+

docs/src/components/HomepageFeatures/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const FeatureList: FeatureItem[] = [
2424
Svg: require('@site/static/img/undraw_success_288d.svg').default,
2525
description: (
2626
<>
27-
PartiNet proides improved identification of rare particle views allowing for comprehensive map reconstruction.
27+
PartiNet provides improved identification of rare particle views allowing for comprehensive map reconstruction.
2828
</>
2929
),
3030
},
@@ -33,7 +33,7 @@ const FeatureList: FeatureItem[] = [
3333
Svg: require('@site/static/img/undraw_space-exploration_dhu1.svg').default,
3434
description: (
3535
<>
36-
PartiNet provides up to 10× faster inference than existing tools enabling real-time, on-the-fly picking.
36+
PartiNet provides up to 7× faster inference than existing tools enabling real-time, on-the-fly picking.
3737
</>
3838
),
3939
},

docs/src/pages/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
55
import Layout from '@theme/Layout';
66
import HomepageFeatures from '@site/src/components/HomepageFeatures';
77
import Heading from '@theme/Heading';
8+
import partinetRMSD from '@site/static/img/partinet_RMSD.png';
89

910
import styles from './index.module.css';
1011

@@ -17,6 +18,11 @@ function HomepageHeader() {
1718
{siteConfig.title}
1819
</Heading>
1920
<p className="hero__subtitle">{siteConfig.tagline}</p>
21+
<img
22+
src={partinetRMSD}
23+
alt="PartiNet RMSD"
24+
style={{ maxWidth: '100%', marginTop: '1rem' }}
25+
/>
2026
<div className={styles.buttons}>
2127
<Link
2228
className="button button--secondary button--lg"
@@ -33,8 +39,8 @@ export default function Home(): ReactNode {
3339
const {siteConfig} = useDocusaurusContext();
3440
return (
3541
<Layout
36-
title={`Hello from ${siteConfig.title}`}
37-
description="Description will go into a meta tag in <head />">
42+
title={`PartiNet: high performance particle picking for cryo-EM`}
43+
description="PartiNet is a high performance particle picking pipeline for cryo-electron microscopy (cryo-EM) that provides improved identification of rare particle views and up to 7× faster inference than existing tools.">
3844
<HomepageHeader />
3945
<main>
4046
<HomepageFeatures />

docs/static/img/partinet_RMSD.png

600 KB
Loading

0 commit comments

Comments
 (0)