Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c8f92d6
ignore virtualenv directories, containers and shel scripts
MihinP Apr 27, 2026
4df3252
Fix Docusaurus baseURL for GitHub Pages
MihinP Apr 27, 2026
062de20
Replace print statements with logging in star_file
MihinP Apr 27, 2026
9affc9d
Fix logging to write denoise log in project directory instead of CWD
MihinP Apr 27, 2026
6251852
Fix logging to write detect log in project directory instead of CWD
MihinP Apr 27, 2026
2668f7d
add gradio dependency and gui entry point
MihinP Apr 27, 2026
53124c1
add partinet gui CLI
MihinP Apr 27, 2026
b30b827
Add gradio UI with denoise,detect,star file tabs
MihinP Apr 27, 2026
216231b
Improve Gradio GUI polish and Star File analytics; add doc screenshots.
MihinP May 20, 2026
3fa13ac
Document the Gradio GUI and link it from getting started.
MihinP May 20, 2026
e437370
Remove hardcoded lab paths from Gradio GUI defaults
MihinP Jun 24, 2026
ac0edfd
Fix logging handler accumulation across repeated GUI runs
MihinP Jun 24, 2026
c68442f
Add image_io module and unify MRC loading for detect and star
MihinP Jun 24, 2026
cdd20e2
Add HPC-agnostic job runner with local and Slurm backends
MihinP Jun 24, 2026
b314c4f
Wire GUI stages to job runner for local and Slurm execution
MihinP Jun 24, 2026
8f904c5
Add job runner tests with mocked Slurm commands
MihinP Jun 24, 2026
f072723
Clarify path conventions and skip-denoise workflow in stage docs
MihinP Jun 24, 2026
d104c8d
Expand GUI docs for local and Slurm execution modes
MihinP Jun 24, 2026
91a4aee
Bump version to 1.1.0 and update container labels
MihinP Jun 24, 2026
fdca5c1
More quality of life for GUI implementation
MihinP Jun 24, 2026
e657242
Added recommendation for local installation if using GUI
MihinP Jun 24, 2026
f11bb41
Docusaurus build automations
MihinP Jun 24, 2026
6d4b179
Update singularity version in DEF due to Node20 deprecation
MihinP Jul 1, 2026
e0f5c78
Incorrect semver on singularity version for workflow
MihinP Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: write

defaults:
run:
working-directory: docs

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build website
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
commit_message: "Deploy website"
33 changes: 16 additions & 17 deletions .github/workflows/singularity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,42 @@ jobs:
build-test-containers:
runs-on: ubuntu-latest
strategy:
# Keep going on other deployments if anything bloops
fail-fast: false
matrix:
# Must match an existing tag on quay.io/singularity/singularity (full semver, e.g. 4.1.0 not 4.0).
singularity_version:
- '3.8.1'
- '4.1.0'

container:
image: quay.io/singularity/singularity:v${{ matrix.singularity_version }}
options: --privileged

steps:

- name: Check out code for the container builds
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build Container
- name: Verify Singularity definition exists
run: |
if [ -f Singularity ]; then
sudo -E singularity build container.sif Singularity
else
echo "Singularity is not found."
echo "Present working directory: $PWD"
ls
fi

if [ ! -f Singularity ]; then
echo "Singularity definition file not found in $(pwd)"
ls -la
exit 1
fi

- name: Build Container
run: sudo -E singularity build container.sif Singularity

- name: Set Tag Based on Branch Name
run: |
# Get the branch name and set it as the tag
tag=${GITHUB_REF##*/}-singularity
echo "Tag is $tag."
echo "tag=$tag" >> $GITHUB_ENV

- name: Login and Deploy Container
if: (github.event_name != 'pull_request')
run: |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
container_name=$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]')
singularity push container.sif oras://ghcr.io/${container_name}:${tag}
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ secrets.GHCR_USERNAME }} --password-stdin oras://ghcr.io
container_name=$(echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]')
singularity push container.sif oras://ghcr.io/${container_name}:${tag}
31 changes: 31 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test deployment

on:
pull_request:
branches:
- main

defaults:
run:
working-directory: docs

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci

- name: Test build website
run: npm run build
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,9 @@ cython_debug/

# DynamicDet run files
runs
gui/.venv/
partinet-env/

# Container images and scratch shell scripts
*.sif
*.sh
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN python -m pip install --no-cache-dir --no-cache /opt/PartiNet

LABEL AUTHORS Mihin Perera, Edward Yang, Julie Iskander
LABEL MAINTAINERS Mihin Perera, Edward Yang, Julie Iskander
LABEL VERSION v1.0.1
LABEL VERSION v1.1.0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Use our pretrained model at [Model Weights](https://huggingface.co/MihinP/PartiN
- Seamless integration with cryoSPARC and RELION workflows
- Confidence-based particle filtering
- Visual detection validation
- Browser GUI (`partinet gui`) with optional Slurm job submission

## Prerequisites

Expand Down Expand Up @@ -112,6 +113,7 @@ Available commands:
- `denoise`: Clean input micrographs
- `detect`: Identify particles
- `star`: Generate STAR files
- `gui`: Launch the Gradio GUI (local or Slurm execution)
- `train`: Train custom models


Expand Down
2 changes: 1 addition & 1 deletion Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ from: python:3.9.19-slim-bookworm
%labels
AUTHORS Mihin Perera, Edward Yang, Julie Iskander
MAINTAINERS Mihin Perera, Edward Yang, Julie Iskander
VERSION v1.0.1
VERSION v1.1.0
34 changes: 22 additions & 12 deletions docs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ sidebar_position: 3

This guide walks you through your first PartiNet analysis using the three-stage pipeline. We'll process cryo-EM micrographs from start to finish.

:::tip New to PartiNet?
The **[GUI](gui.md)** is the easiest way to get started — no command-line experience needed. Launch it with `partinet gui` and run all three stages from your browser.

![PartiNet GUI overview](/img/gui_overview.png)

The CLI walkthrough below is for users who prefer scripting, are working in containers, or need to run PartiNet on an HPC cluster.
:::

## Prerequisites

Before starting, ensure you have:
Expand All @@ -24,27 +32,29 @@ project_directory/
│ ├── micrograph1.mrc
│ ├── micrograph2.mrc
│ └── ...
├── denoised/ # Created by denoise stage
│ ├── micrograph1.mrc
│ ├── micrograph2.mrc
├── denoised/ # Created by denoise stage (default: .png)
│ ├── micrograph1.png
│ ├── micrograph2.png
│ └── ...
├── exp/ # Created by detect stage
│ ├── labels/ # Detection coordinates (YOLO format)
│ │ ├── micrograph1.txt
│ │ ├── micrograph2.txt
│ │ └── ...
│ ├── micrograph1.png # Micrographs with detections drawn
│ ├── micrograph2.
│ ├── micrograph1.png # Micrographs with detections drawn
│ ├── micrograph2.png
│ └── ...
└── partinet_particles.star # CryoSPARC-style STAR file (created by star stage)
```

**Pipeline Flow:**
1. **Input** → `motion_corrected/` (your micrographs)
2. **Stage 1** → `denoised/` (cleaned micrographs)
2. **Stage 1** → `denoised/` (cleaned micrographs, PNG by default)
3. **Stage 2** → `exp*/` (detections + visualizations)
4. **Stage 3** → `*.star` (final particle coordinates)

See [Detect — skip denoise](stages/detect.md#skip-denoise-raw-mrc) if picking directly on raw MRC without denoising.

## Stage 1: Denoise

The first stage removes noise from your micrographs and improves signal-to-noise ratios:
Expand All @@ -53,8 +63,8 @@ The first stage removes noise from your micrographs and improves signal-to-noise

```shell title="Local Installation"
partinet denoise \
--source /data/my_project/motion_corrected \
--project /data/my_project
--source /data/partinet_picking/motion_corrected \
--project /data/partinet_picking
```

</div>
Expand Down Expand Up @@ -100,9 +110,9 @@ The final stage converts detections to STAR format and applies confidence filter

```shell title="Local Installation"
partinet star \
--labels /data/my_project/exp/labels \
--images /data/my_project/denoised \
--output /data/my_project/partinet_particles.star \
--labels /data/partinet_picking/exp/labels \
--images /data/partinet_picking/denoised \
--output /data/partinet_picking/partinet_particles.star \
--conf 0.1
```

Expand All @@ -118,7 +128,7 @@ partinet star \
After running all three stages, you'll have:

1. **Denoised micrographs** (`denoised/`) - Cleaned input for particle detection
2. **Detection visualizations** (`exp/*.mrc`) - Micrographs with particle boxes drawn
2. **Detection visualizations** (`exp/*.png`) - Micrographs with particle boxes drawn
3. **Detection coordinates** (`exp/labels/*.txt`) - Raw detection data
4. **STAR file** (`*.star`) - Final particle coordinates ready for downstream processing

Expand Down
Loading
Loading