Skip to content

Commit

Permalink
[site]DEPRECATED
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhenHuangLab committed Aug 13, 2024
1 parent 64ab516 commit b60404e
Show file tree
Hide file tree
Showing 19 changed files with 674 additions and 555 deletions.
5 changes: 2 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: MemXTerminator Wiki
site_name: DEPRECATED_MemXTerminator Wiki
repo_url: https://github.com/ZhenHuangLab/MemXTerminator
repo_name: MemXTerminator
site_description: A simple and beautiful wiki for MemXTerminator
site_description: DEPRECATED_A simple and beautiful wiki for MemXTerminator
site_author: Zhen Huang

theme:
Expand Down Expand Up @@ -39,7 +39,6 @@ theme:
- navigation.path
- navigation.indexes
- navigation.footer
- announce.dismiss
- toc.follow
- content.code.copy
- content.code.annotate
Expand Down
70 changes: 39 additions & 31 deletions wiki/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,67 @@
---
comments: true
---
# Welcome to MemXTerminator Wiki!

MemXTerminator is a software for membrane analysis and subtraction in cryo-EM.
[Check out the new WIKI!](https://memxterminator.github.io/wiki/){ .md-button }

![MemXTerminator](./assets/images/0-1.png)
<span class="caption">MemXTerminator</span>
!!! danger "This wiki is deprecated!"
This wiki is deprecated. Please check out the new [MemXTerminator Wiki](https://memxterminator.github.io/wiki/).

## Overview
??? failure "DEPRECATED"

This software utilizes 2D averages and their corresponding alignment information, employing methods such as Radon transform, cross-correlation, L1 norm, Bezier curves, Monte Carlo simulations, and Genetic Algorithm. It analyzes and subtracts membranes of any shape in cryo-EM, ultimately producing particle stacks and micrographs with membrane signals removed, which are suitable for subsequent membrane protein analysis.
# Welcome to MemXTerminator Wiki!

## Features
MemXTerminator is a software for membrane analysis and subtraction in cryo-EM.

* Capable of analyzing biological membranes of any shape, including simple lines and arcs, as well as more complex shapes like S or W curves;
* Accurately locates and subtracts biological membrane signals;
* Utilizes GPU and CUDA acceleration to enhance computational speed;
* Features a user-friendly GUI for ease of use.
![MemXTerminator](./assets/images/0-1.png)
<span class="caption">MemXTerminator</span>

## Requirements
## Overview

* This software requires a GPU and CUDA acceleration. So, the installation of CUDA drivers and libraries is necessary.
* [pyem](https://github.com/asarnow/pyem) is also needed to convert cryoSPARC’s `.cs` files to Relion’s `.star` format for processing.
This software utilizes 2D averages and their corresponding alignment information, employing methods such as Radon transform, cross-correlation, L1 norm, Bezier curves, Monte Carlo simulations, and Genetic Algorithm. It analyzes and subtracts membranes of any shape in cryo-EM, ultimately producing particle stacks and micrographs with membrane signals removed, which are suitable for subsequent membrane protein analysis.

## Installation
## Features

For specific installation methods, please refer to the **Installation** section.
* Capable of analyzing biological membranes of any shape, including simple lines and arcs, as well as more complex shapes like S or W curves;
* Accurately locates and subtracts biological membrane signals;
* Utilizes GPU and CUDA acceleration to enhance computational speed;
* Features a user-friendly GUI for ease of use.

## Usage
## Requirements

This software has a user-friendly GUI. To use this software, simply type:
* This software requires a GPU and CUDA acceleration. So, the installation of CUDA drivers and libraries is necessary.
* [pyem](https://github.com/asarnow/pyem) is also needed to convert cryoSPARC’s `.cs` files to Relion’s `.star` format for processing.

```bash
## Installation

MemXTerminator gui &
For specific installation methods, please refer to the **Installation** section.

```
## Usage

For detailed usage tutorials, please refer to the **Usage** section.
This software has a user-friendly GUI. To use this software, simply type:

## License
```bash

This software is licensed under [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0-standalone.html). <a href="https://www.gnu.org/licenses/gpl-3.0.html"><img src="https://www.gnu.org/graphics/gplv3-with-text-84x42.png"></a>
MemXTerminator gui &

## Acknowledgement
```

Thanks to [Jack(Kai) Zhang@Yale MB&B](https://medicine.yale.edu/profile/jack-zhang/) for his guidance.
For detailed usage tutorials, please refer to the **Usage** section.

## Contributing
## License

**Always welcome!** This software may still has room for improvement such as updating the usage documentation, improving the GUI design, and enhancing the software's usability.
This software is licensed under [GPL v3.0](https://www.gnu.org/licenses/gpl-3.0-standalone.html). <a href="https://www.gnu.org/licenses/gpl-3.0.html"><img src="https://www.gnu.org/graphics/gplv3-with-text-84x42.png"></a>

I am still working on improving this software. More exciting features are on the way!
## Acknowledgement

## Contact
Thanks to [Jack(Kai) Zhang@Yale MB&B](https://medicine.yale.edu/profile/jack-zhang/) for his guidance.

If you have any questions, please feel free to contact me: [[email protected]](mailto:[email protected])
## Contributing

**Always welcome!** This software may still has room for improvement such as updating the usage documentation, improving the GUI design, and enhancing the software's usability.

I am still working on improving this software. More exciting features are on the way!

## Contact

If you have any questions, please feel free to contact me: [[email protected]](mailto:[email protected])
93 changes: 50 additions & 43 deletions wiki/docs/tutorials/basic-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,88 @@
comments: true
---

!!! abstract "Abstract"
This article primarily introduces the basic concept and steps of membrane subtraction.
[Check out the new WIKI!](https://memxterminator.github.io/wiki/){ .md-button }

## Basic Concept
!!! danger "This wiki is deprecated!"
This wiki is deprecated. Please check out the new [MemXTerminator Wiki](https://memxterminator.github.io/wiki/).

1. Use `cryoSPARC` to select particles with the biological membrane at the image center and their corresponding 2D averages;
2. For each 2D average, use methods like Radon transform and Bezier curve fitting to derive the mathematical model of that type of biological membrane, which includes information about the membrane center, angle, curvature, etc. (for Radonfit) or the coordinates of some control points of bezier curves (for Bezierfit);
3. Based on the mathematical model of the biological membrane and alignment information in `cryoSPARC`, perform membrane subtraction on all raw images of that type of biological membrane to obtain a particle stack after membrane subtraction;
4. Place the membrane-subtracted particle stacks back into the original micrographs for subsequent analysis. For example, you can re-pick the protein-of-interest in these membrane-subtracted micrographs.
??? failure "DEPRECATED"

## Basic Steps
!!! abstract "Abstract"
This article primarily introduces the basic concept and steps of membrane subtraction.

### 1 Obtaining 2D Averages with the Membrane Center at the Image Center
## Basic Concept

The goal of this step is to make the analysis of the membrane in the second step more accurate and easier, as **the Radon transform might fail to analyze properly if the membrane center is not at the image center**, especially with significant deviations.
1. Use `cryoSPARC` to select particles with the biological membrane at the image center and their corresponding 2D averages;
2. For each 2D average, use methods like Radon transform and Bezier curve fitting to derive the mathematical model of that type of biological membrane, which includes information about the membrane center, angle, curvature, etc. (for Radonfit) or the coordinates of some control points of bezier curves (for Bezierfit);
3. Based on the mathematical model of the biological membrane and alignment information in `cryoSPARC`, perform membrane subtraction on all raw images of that type of biological membrane to obtain a particle stack after membrane subtraction;
4. Place the membrane-subtracted particle stacks back into the original micrographs for subsequent analysis. For example, you can re-pick the protein-of-interest in these membrane-subtracted micrographs.

#### 1.1 Creating a Series of Templates with the Membrane Center at the Image Center
## Basic Steps

Select a 2D average with a good signal-to-noise ratio and dominant biological membrane signals from `cryoSPARC`. Based on it, create a series of 2D average templates where the biological membrane center is at the image center, the direction is vertical, but with varying curvatures.
### 1 Obtaining 2D Averages with the Membrane Center at the Image Center

![Kappa templates](../assets/images/kappa-templates-image.gif){: .small}
<span class="caption">Kappa templates</span>
The goal of this step is to make the analysis of the membrane in the second step more accurate and easier, as **the Radon transform might fail to analyze properly if the membrane center is not at the image center**, especially with significant deviations.

Use these generated templates as new templates to pick particles again, ensuring the accurate positioning of the particles' centers at the membrane center in the micrographs.
#### 1.1 Creating a Series of Templates with the Membrane Center at the Image Center

![Particles picked using cryoSPARC](../assets/images/1_5.png){: .small}
<span class="caption">Particles picked using cryoSPARC</span>
Select a 2D average with a good signal-to-noise ratio and dominant biological membrane signals from `cryoSPARC`. Based on it, create a series of 2D average templates where the biological membrane center is at the image center, the direction is vertical, but with varying curvatures.

#### 1.2 Extract Particles & 2D Classification
![Kappa templates](../assets/images/kappa-templates-image.gif){: .small}
<span class="caption">Kappa templates</span>

Extract those particles for 2D classification. The obtained 2D averages should have their membrane centers at the image center. Use these 2D averages for subsequent membrane analysis.
Use these generated templates as new templates to pick particles again, ensuring the accurate positioning of the particles' centers at the membrane center in the micrographs.

![Obtained 2D Averages](../assets/images/1_6.png){: .small}
<span class="caption">Obtained 2D Averages</span>
![Particles picked using cryoSPARC](../assets/images/1_5.png){: .small}
<span class="caption">Particles picked using cryoSPARC</span>

### 2 Analyzing 2D Averages to Obtain Corresponding Mathematical Model
#### 1.2 Extract Particles & 2D Classification

#### 2.1 Radonfit
Extract those particles for 2D classification. The obtained 2D averages should have their membrane centers at the image center. Use these 2D averages for subsequent membrane analysis.

This method mainly uses Radon transform and cross-correlation to fit the 2D averages with **simple lines and arcs as models**, obtaining mathematical models that include the membrane center, angle, curvature, etc. It's suitable for **simpler biological membrane models**, such as viral envelopes.
![Obtained 2D Averages](../assets/images/1_6.png){: .small}
<span class="caption">Obtained 2D Averages</span>

##### 2.1.1 Radon Analysis Blinking
### 2 Analyzing 2D Averages to Obtain Corresponding Mathematical Model

Analyze each 2D average to determine the proper parameters for Radon transform, including crop rate, threshold, and the range of Radon transform angles, because being able to utilize Radon transform to get reasonable results is very crucial for Membrane Analysis. Save these parameters into a JSON file for the next step of membrane analysis.
#### 2.1 Radonfit

##### 2.1.2 Membrane Analysis
This method mainly uses Radon transform and cross-correlation to fit the 2D averages with **simple lines and arcs as models**, obtaining mathematical models that include the membrane center, angle, curvature, etc. It's suitable for **simpler biological membrane models**, such as viral envelopes.

Analyze the 2D averages, obtaining information for each 2D average like membrane center, angle, bilayer distance, monolayer thickness (size of sigma after Gaussian fitting), and curvature. This information corresponds to the mathematical model, which can be used to obtain the averaged biological membrane and its mask.
##### 2.1.1 Radon Analysis Blinking

#### 2.2 Bezierfit
Analyze each 2D average to determine the proper parameters for Radon transform, including crop rate, threshold, and the range of Radon transform angles, because being able to utilize Radon transform to get reasonable results is very crucial for Membrane Analysis. Save these parameters into a JSON file for the next step of membrane analysis.

This method mainly uses Bezier curves combined with Monte Carlo and Genetic Algorithm to fit the biological membrane in the 2D averages with **more complex irregular curves as models**, resulting in several control points and corresponding Bezier curve expressions(mathematical models). It's suitable for **more complex biological membrane models**, like S-shaped, W-shaped, etc., such as mitochondrial membranes.
##### 2.1.2 Membrane Analysis

##### 2.2.1 Randomly Generate Sampling Points in the Membrane Area
Analyze the 2D averages, obtaining information for each 2D average like membrane center, angle, bilayer distance, monolayer thickness (size of sigma after Gaussian fitting), and curvature. This information corresponds to the mathematical model, which can be used to obtain the averaged biological membrane and its mask.

For each 2D average, first use a maximum value filter to extract the rough area containing the biological membrane signal from the 2D average, then randomly generate several sampling points in this area as reference points for the initial fitting of the Bezier curve.
#### 2.2 Bezierfit

##### 2.2.2 Preliminary Fitting Using Genetic Algorithm
This method mainly uses Bezier curves combined with Monte Carlo and Genetic Algorithm to fit the biological membrane in the 2D averages with **more complex irregular curves as models**, resulting in several control points and corresponding Bezier curve expressions(mathematical models). It's suitable for **more complex biological membrane models**, like S-shaped, W-shaped, etc., such as mitochondrial membranes.

Use Genetic Algorithm for a preliminary fitting of the reference points generated in the first step, obtaining several control points and the corresponding bezier curve expressions. This step allows determining the general direction and shape of the membrane based on the position information of the points from the previous step.
##### 2.2.1 Randomly Generate Sampling Points in the Membrane Area

##### 2.2.3 Adjusting Control Points Using Genetic Algorithm to Optimize Fitting Results
For each 2D average, first use a maximum value filter to extract the rough area containing the biological membrane signal from the 2D average, then randomly generate several sampling points in this area as reference points for the initial fitting of the Bezier curve.

Further optimize the control points obtained in the preliminary fitting step using Genetic Algorithm again. By maximizing the value of cross-correlation function, adjust the positions of the control points to obtain several optimal control points that fit the shape of the membrane in the 2D average. These optimal control points correspond to a bezier curve expression describing the shape of the membrane.
##### 2.2.2 Preliminary Fitting Using Genetic Algorithm

### 3 Particle Membrane Subtraction
Use Genetic Algorithm for a preliminary fitting of the reference points generated in the first step, obtaining several control points and the corresponding bezier curve expressions. This step allows determining the general direction and shape of the membrane based on the position information of the points from the previous step.

Each type of 2D average corresponds to several raw particle stacks. From the previous analysis of the 2D average, we can obtain the mathematical model of that type of biological membrane, which gives us the membrane signal information for each raw particle.
##### 2.2.3 Adjusting Control Points Using Genetic Algorithm to Optimize Fitting Results

Perform membrane subtraction on each previously extracted raw particle to obtain the corresponding membrane-subtracted particle, generating another corresponding membrane-subtracted particle stack.
Further optimize the control points obtained in the preliminary fitting step using Genetic Algorithm again. By maximizing the value of cross-correlation function, adjust the positions of the control points to obtain several optimal control points that fit the shape of the membrane in the 2D average. These optimal control points correspond to a bezier curve expression describing the shape of the membrane.

### 4 Micrograph Membrane Subtraction
### 3 Particle Membrane Subtraction

Replace the original raw particles in the micrographs with the corresponding membrane-subtracted particles to obtain new micrographs, where the membrane signals can be weakened or even removed.
Each type of 2D average corresponds to several raw particle stacks. From the previous analysis of the 2D average, we can obtain the mathematical model of that type of biological membrane, which gives us the membrane signal information for each raw particle.

### 5 Post-analysis
Perform membrane subtraction on each previously extracted raw particle to obtain the corresponding membrane-subtracted particle, generating another corresponding membrane-subtracted particle stack.

In the new membrane-subtracted micrographs, you can use membrane protein templates to re-pick particles for subsequent analysis.
### 4 Micrograph Membrane Subtraction

Replace the original raw particles in the micrographs with the corresponding membrane-subtracted particles to obtain new micrographs, where the membrane signals can be weakened or even removed.

### 5 Post-analysis

In the new membrane-subtracted micrographs, you can use membrane protein templates to re-pick particles for subsequent analysis.
Loading

0 comments on commit b60404e

Please sign in to comment.