|
| 1 | +--- |
| 2 | +sidebar_position: 3 |
| 3 | +--- |
| 4 | + |
| 5 | +# Getting Started |
| 6 | + |
| 7 | +This guide walks you through your first PartiNet analysis using the three-stage pipeline. We'll process cryo-EM micrographs from start to finish. |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +Before starting, ensure you have: |
| 12 | +- PartiNet installed (see [Installation](installation.md)) |
| 13 | +- Motion-corrected micrographs in a source directory |
| 14 | +- A project directory where outputs will be saved |
| 15 | +- GPU access for optimal performance |
| 16 | + |
| 17 | +## Directory Structure |
| 18 | + |
| 19 | +PartiNet expects and creates the following directory structure: |
| 20 | + |
| 21 | +``` |
| 22 | +project_directory/ |
| 23 | +├── motion_corrected/ # 📁 Your input micrographs |
| 24 | +│ ├── micrograph1.mrc |
| 25 | +│ ├── micrograph2.mrc |
| 26 | +│ └── ... |
| 27 | +├── denoised/ # 🧹 Created by denoise stage |
| 28 | +│ ├── micrograph1.mrc |
| 29 | +│ ├── micrograph2.mrc |
| 30 | +│ └── ... |
| 31 | +├── exp/ # 🎯 Created by detect stage |
| 32 | +│ ├── labels/ # 📋 Detection coordinates |
| 33 | +│ │ ├── micrograph1.txt |
| 34 | +│ │ ├── micrograph2.txt |
| 35 | +│ │ └── ... |
| 36 | +│ ├── micrograph1.png # 🖼️ Micrographs with detections drawn |
| 37 | +│ ├── micrograph2. |
| 38 | +│ └── ... |
| 39 | +└── partinet_particles.star # ⭐ Final STAR file (created by star stage) |
| 40 | +``` |
| 41 | + |
| 42 | +**Pipeline Flow:** |
| 43 | +1. **Input** → `motion_corrected/` (your micrographs) |
| 44 | +2. **Stage 1** → `denoised/` (cleaned micrographs) |
| 45 | +3. **Stage 2** → `exp*/` (detections + visualizations) |
| 46 | +4. **Stage 3** → `*.star` (final particle coordinates) |
| 47 | + |
| 48 | +## Stage 1: Denoise |
| 49 | + |
| 50 | +The first stage removes noise from your micrographs and improves signal-to-noise ratios: |
| 51 | + |
| 52 | +<div class="container-tabs"> |
| 53 | + |
| 54 | +```shell title="Local Installation" |
| 55 | +partinet denoise \ |
| 56 | + --source /data/my_project/motion_corrected \ |
| 57 | + --project /data/my_project |
| 58 | +``` |
| 59 | + |
| 60 | +</div> |
| 61 | + |
| 62 | +**What this does:** |
| 63 | +- Reads micrographs from `motion_corrected/` directory |
| 64 | +- Applies denoising algorithms |
| 65 | +- Saves cleaned micrographs to `denoised/` directory in your project folder |
| 66 | + |
| 67 | +## Stage 2: Detect |
| 68 | + |
| 69 | +The detection stage identifies particles in your denoised micrographs: |
| 70 | + |
| 71 | +<div class="container-tabs"> |
| 72 | + |
| 73 | +```shell title="Local Installation" |
| 74 | +partinet detect \ |
| 75 | + --weight /path/to/downloaded/model_weights.pt \ |
| 76 | + --source /data/partinet_picking/denoised \ |
| 77 | + --device 0,1,2,3 \ |
| 78 | + --project /data/partinet_picking |
| 79 | +``` |
| 80 | + |
| 81 | +</div> |
| 82 | + |
| 83 | +**What this creates:** |
| 84 | +- `exp/` directory in your project folder |
| 85 | +- `exp/labels/` directory containing detection coordinates for each micrograph |
| 86 | +- Micrographs with detection boxes drawn on top (saved in `exp/`) |
| 87 | + |
| 88 | +**Key parameters:** |
| 89 | +- `--backbone-detector`: Neural network architecture to use |
| 90 | +- `--weight`: Path to trained model weights |
| 91 | +- `--conf-thres`: Confidence threshold for detections (0.0 = accept all) |
| 92 | +- `--iou-thres`: Intersection over Union threshold for filtering overlapping detections |
| 93 | +- `--device`: GPU devices to use (0,1,2,3 = use 4 GPUs) |
| 94 | + |
| 95 | +## Stage 3: Star |
| 96 | + |
| 97 | +The final stage converts detections to STAR format and applies confidence filtering: |
| 98 | + |
| 99 | +<div class="container-tabs"> |
| 100 | + |
| 101 | +```shell title="Local Installation" |
| 102 | +partinet star \ |
| 103 | + --labels /data/my_project/exp/labels \ |
| 104 | + --images /data/my_project/denoised \ |
| 105 | + --output /data/my_project/partinet_particles.star \ |
| 106 | + --conf 0.1 |
| 107 | +``` |
| 108 | + |
| 109 | +</div> |
| 110 | + |
| 111 | +**What this does:** |
| 112 | +- Reads detection labels from `exp/labels/` |
| 113 | +- Filters particles based on confidence threshold (0.1 in this example) |
| 114 | +- Creates a STAR file ready for further processing in RELION or other software |
| 115 | + |
| 116 | +## Output Files |
| 117 | + |
| 118 | +After running all three stages, you'll have: |
| 119 | + |
| 120 | +1. **Denoised micrographs** (`denoised/`) - Cleaned input for particle detection |
| 121 | +2. **Detection visualizations** (`exp/*.mrc`) - Micrographs with particle boxes drawn |
| 122 | +3. **Detection coordinates** (`exp/labels/*.txt`) - Raw detection data |
| 123 | +4. **STAR file** (`*.star`) - Final particle coordinates ready for downstream processing |
| 124 | + |
| 125 | + |
| 126 | +## Next Steps |
| 127 | + |
| 128 | +- Learn more about individual stages: [Denoise](stages/denoise.md), [Detect](stages/detect.md), [STAR](stages/star.md) |
| 129 | + |
| 130 | +## Troubleshooting |
| 131 | + |
| 132 | +If you encounter issues: |
| 133 | +- Ensure all paths exist and are accessible |
| 134 | +- Check GPU availability with `nvidia-smi` |
| 135 | +- Verify container mounting with `-B` flags includes all necessary paths |
0 commit comments