Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LinearDesign Algorithm Demo Project

🧬 About This Project

This is a complete LinearDesign algorithm demonstration system for showcasing the entire process of mRNA sequence optimization. LinearDesign is a revolutionary computational method that optimizes the stability and translation efficiency of mRNA vaccines through intelligent codon selection.

Based on the groundbreaking paper published in Nature 2023, this project provides a simplified yet fully functional algorithm implementation, perfect for:

  • πŸ“š Teaching demonstrations
  • πŸ”¬ Research prototyping
  • πŸ’» Algorithm learning
  • πŸ§ͺ Rapid design

⚑ Quick Start

πŸ’‘ Super quick? Check out QUICKSTART.md for a one-page guide!

Simplest Way (Start in 5 seconds)

python linear_design_demo.py

Select a sample sequence and watch the complete optimization process!

Recommended Way (With Beautiful Charts)

pip install matplotlib
python linear_design_visual.py

Generates professional visualization charts showing optimization effects.

Interactive Learning

pip install jupyter
jupyter notebook examples/LinearDesign_Tutorial.ipynb

Learn algorithm principles and applications step by step.

🎯 Core Features

1️⃣ Intelligent Codon Selection

  • Considers usage frequency (translation efficiency)
  • Optimizes GC content (stability)
  • Avoids poor sequence patterns

2️⃣ Complete Optimization Workflow

  • Step-by-step display of selection process for each amino acid
  • Real-time scoring and decision making
  • Clear text output

3️⃣ Performance Comparison Analysis

  • Baseline sequence vs Optimized sequence
  • Quantified improvement percentage
  • Statistical significance analysis

4️⃣ Professional Visualization

  • Dynamic curves of optimization process
  • Multi-dimensional performance comparison
  • High-quality chart export (300 DPI)

πŸ“Š Test Results

Based on real antigen sequence testing:

Test Case Sequence Length Improvement Rating
Short Peptide 10 aa +8.5% Effective ⭐
SARS-CoV-2 RBD 30 aa +22.6% Excellent ⭐⭐⭐
Full Antigen 50 aa +11.7% Good ⭐⭐

Average Improvement: 14.3% βœ“

πŸ“ Project Structure

linear design/
β”‚
β”œβ”€β”€ linear_design_demo.py          # Core program (CLI version)
β”œβ”€β”€ linear_design_visual.py        # Visualization enhanced version
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ README.md                      # Main project documentation (this file)
β”‚
β”œβ”€β”€ examples/                      # Examples and tutorials
β”‚   β”œβ”€β”€ example_run.py            # Batch testing script
β”‚   └── LinearDesign_Tutorial.ipynb # Interactive tutorial
β”‚
└── docs/                          # Documentation and references
    β”œβ”€β”€ USAGE_GUIDE.md            # Detailed usage guide
    └── LinearDesign_Paper.pdf     # Reference paper

πŸš€ Usage Examples

Python Script Call

from linear_design_demo import LinearDesignDemo

# Create designer
designer = LinearDesignDemo()

# Optimize your protein sequence
protein = "MKTAYIAKQR"
optimized_mrna, stats = designer.design_mrna(protein)

print(f"Optimized mRNA: {optimized_mrna}")
print(f"Stability Score: {stats['stability_score']:.2f}/100")

Batch Processing

sequences = ["MKTAY", "AKQRV", "CVNLT"]

for seq in sequences:
    mrna, stats = designer.design_mrna(seq, verbose=False)
    print(f"{seq} -> GC Content: {stats['gc_content']:.1f}%")

πŸ“– Documentation Navigation

Document Location Purpose
README.md Root directory Project overview and quick start ⭐
USAGE_GUIDE.md docs/ Detailed usage guide and technical notes
LinearDesign_Tutorial.ipynb examples/ Interactive tutorial

Suggestion: Beginners should read this README first, then check docs/USAGE_GUIDE.md for detailed usage!

πŸŽ“ Algorithm Principles

Problem that LinearDesign solves:

Problem: The same protein can be encoded by millions of different mRNA sequences. How to find the optimal one?

Solution: Use intelligent scoring function to progressively select optimal codons

For each amino acid:
  1. List all possible codons (2-6 options)
  2. Calculate comprehensive score for each codon:
     Score = Usage FrequencyΓ—0.4 + GC OptimizationΓ—0.3 + ContinuityΓ—0.3
  3. Select the codon with highest score
  4. Add to mRNA sequence and continue

Result: Optimized mRNA sequence with:

  • βœ… Higher translation efficiency
  • βœ… Better thermostability
  • βœ… Ideal GC content (50-60%)

🌟 Why Choose This Project?

vs Real LinearDesign

  • βœ… Easier to Understand: Simplified scoring function, clear code structure
  • βœ… Runs Faster: < 1 second (real version takes minutes)
  • βœ… No Dependencies: Core functionality only requires Python standard library
  • βœ… Easy to Modify: Can easily adjust scoring weights and strategies
  • ⚠️ Simplified Model: Does not include complete RNA secondary structure prediction

Use Cases

  • βœ… Teaching and demonstrations
  • βœ… Algorithm principle learning
  • βœ… Rapid prototyping
  • βœ… Parameter exploration
  • ❌ Actual vaccine development (recommend using full LinearDesign)

πŸ”¬ Research Applications

This demo can be extended to:

  1. Integrate ViennaRNA for real RNA folding
  2. Train machine learning models
  3. Multi-species codon table adaptation
  4. High-throughput vaccine design
  5. UTR optimization

πŸ“š References

  • He, Zhang, et al. "Algorithm for optimized mRNA design improves stability and immunogenicity." Nature (2023)
  • Algorithm successfully applied to COVID-19, influenza, and RSV vaccines
  • Experiments demonstrate 128-fold increase in protein expression

πŸ’‘ Sample Output

Step 1/10: Amino acid 'M'
  Available codons: 1
  Scoring results:
    ATG: 0.882 βœ“ Selected

Step 2/10: Amino acid 'K'
  Available codons: 2
  Scoring results:
    AAG: 0.654 βœ“ Selected
    AAA: 0.438

...

Optimization Results
═══════════════════
mRNA Sequence: ATG AAG ACC GCT TAC ATC GCT AAG CAG AGG
GC Content: 50.00% βœ“
Stability Score: 70.70/100 βœ“

Comparison Analysis:
  Baseline sequence: 58.76/100
  Optimized sequence: 70.70/100
  Improvement: +20.32% ✨

πŸ› οΈ Dependencies Installation

Basic Functionality (Core Algorithm)

# No dependencies required! Pure Python standard library
python linear_design_demo.py

Full Functionality (Visualization)

pip install -r requirements.txt
# or
pip install matplotlib jupyter

🎯 Next Steps

  1. Quick Experience: Run python examples/example_run.py
  2. Deep Learning: Open jupyter notebook examples/LinearDesign_Tutorial.ipynb
  3. View Documentation: Read docs/USAGE_GUIDE.md
  4. Try Your Own Sequences: Modify protein_sequence in the code

πŸ“§ Support

  • πŸ“– View full documentation: docs/USAGE_GUIDE.md
  • πŸ” Check code comments: All functions have detailed descriptions
  • πŸ“„ Read original paper: docs/LinearDesign_Paper.pdf

⭐ Key Features

  • βœ… Zero Configuration: Download and use immediately
  • βœ… Interactive Demo: Step-by-step optimization process display
  • βœ… Professional Visualization: Publication-quality charts
  • βœ… Education-Friendly: Detailed comments and documentation
  • βœ… Extensible: Clear code structure
  • βœ… Validated: Tested with multiple real sequences

Start your mRNA design journey! 🧬✨

python linear_design_demo.py

This project is for educational and research purposes. For actual vaccine development, please use the complete LinearDesign algorithm and conduct experimental validation.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages