@@ -17,45 +17,99 @@ Simple is a bioinformatics pipeline for mapping EMS-induced point mutations usin
1717### Step 1: Prepare Your Data
1818
1919> [ !IMPORTANT]
20- > ** File Naming Convention **
20+ > ** Create a Working Directory **
2121>
22- > Your FastQ files ** MUST** follow this exact naming pattern in the ` fastq/ ` directory:
22+ > ** You must create a folder containing your FastQ files before running the pipeline.** The pipeline will create all output in a timestamped subdirectory within this folder.
23+ > If you have cloned this repository, just use the ` data ` and ` runs ` directories.
24+ > Otherwise create them inside a clean directory.
2325
2426### Required File Names:
27+ The pipeline automatically detects files based on flexible patterns. Files must contain:
28+ - ** "mut"** for mutant bulk samples
29+ - ** "wt"** for wild-type bulk samples
30+ - ** "R1"** or ** "R2"** to indicate read direction
31+ - ** Any extension** : ` .fastq ` , ` .fq ` , ` .fastq.gz ` , ` .fq.gz ` , etc.
32+
33+ ### ✅ Setup Example:
34+ ``` bash
35+ # 1. Create your analysis folder
36+ mkdir my_mutant_analysis
37+ cd my_mutant_analysis
38+
39+ # 2. Create data folder for your FastQ files
40+ mkdir -p data runs
41+
42+ # 3. Copy your FastQ files to the data folder
43+ # Your folder should now look like this:
44+ ls -la data/
45+ # mut.R1.fq.gz mut.R2.fq.gz wt.R1.fq.gz wt.R2.fq.gz
46+ ```
47+
48+ ### ✅ Supported Examples:
49+ ```
50+ my_analysis/
51+ ├── data/
52+ │ ├── mut.R1.fq.gz # Mutant bulk, read 1 (compressed)
53+ │ ├── mut.R2.fq.gz # Mutant bulk, read 2 (compressed)
54+ │ ├── wt.R1.fastq # Wild-type bulk, read 1 (uncompressed)
55+ │ └── wt.R2.fastq # Wild-type bulk, read 2 (uncompressed)
56+ └── runs/ # Created automatically by pipeline
2557```
26- fastq/
27- ├── mut.R1.fastq # Mutant bulk, read 1
28- ├── mut.R2.fastq # Mutant bulk, read 2 (paired-end)
29- ├── wt.R1.fastq # Wild-type bulk, read 1
30- └── wt.R2.fastq # Wild-type bulk, read 2 (paired-end)
58+
59+ ### ✅ Alternative Naming (with line prefix):
60+ ```
61+ my_analysis/
62+ ├── data/
63+ │ ├── root_mutant.mut.R1.fq.gz
64+ │ ├── root_mutant.mut.R2.fq.gz
65+ │ ├── root_mutant.wt.R1.fq.gz
66+ │ └── root_mutant.wt.R2.fq.gz
67+ └── runs/ # Created automatically by pipeline
3168```
3269
33- ### Alternative Naming (with line prefix) :
70+ ### ✅ More Examples :
3471```
35- fastq/
36- ├── YOUR_LINE_NAME.mut.R1.fastq
37- ├── YOUR_LINE_NAME.mut.R2.fastq
38- ├── YOUR_LINE_NAME.wt.R1.fastq
39- └── YOUR_LINE_NAME.wt.R2.fastq
72+ my_analysis/
73+ ├── data/
74+ │ ├── sample_mut.R1.fastq.gz
75+ │ ├── sample_mut.R2.fastq.gz
76+ │ ├── sample_wt.R1.fastq.gz
77+ │ └── sample_wt.R2.fastq.gz
78+ └── runs/ # Created automatically by pipeline
79+ ```
80+
81+ ### 📁 Repository Structure (for developers):
82+ ```
83+ simple-fork/
84+ ├── data/ # Example data folder (rename to your analysis name)
85+ │ ├── mut.R1.fq.gz
86+ │ ├── mut.R2.fq.gz
87+ │ ├── wt.R1.fq.gz
88+ │ └── wt.R2.fq.gz
89+ ├── scripts/ # Pipeline scripts
90+ ├── programs/ # Bioinformatics tools
91+ └── Dockerfile
4092```
4193
4294### ⚠️ Common Mistakes to Avoid:
43- - ❌ ` mutant.fastq ` - Wrong! Must be ` mut.R1.fastq `
44- - ❌ ` wildtype.fastq ` - Wrong! Must be ` wt.R1.fastq `
45- - ❌ ` mut_1.fastq ` - Wrong! Must be ` mut.R1.fastq `
46- - ❌ ` wt_1.fastq ` - Wrong! Must be ` wt.R1.fastq `
47- - ❌ Missing ` .R1 ` or ` .R2 ` - Wrong! Required for paired-end
95+ - ❌ ` mutant.fastq ` - Missing "R1" or "R2" identifier
96+ - ❌ ` wildtype.fastq ` - Missing "R1" or "R2" identifier
97+ - ❌ ` mut_1.fastq ` - Should be ` mut.R1.fastq `
98+ - ❌ ` wt_1.fastq ` - Should be ` wt.R1.fastq `
99+ - ❌ Files without "mut" or "wt" in the name
100+ - ❌ Files without "R1" or "R2" in the name
48101
49102### ✅ Correct Examples:
50- - ` mut.R1.fastq ` , ` mut.R2.fastq ` , ` wt.R1.fastq ` , ` wt.R2.fastq `
103+ - ` mut.R1.fq.gz ` , ` mut.R2.fq.gz ` , ` wt.R1.fq.gz ` , ` wt.R2.fq.gz `
51104- ` root_mutant.mut.R1.fastq ` , ` root_mutant.mut.R2.fastq ` , ` root_mutant.wt.R1.fastq ` , ` root_mutant.wt.R2.fastq `
105+ - ` sample_mut.R1.fq ` , ` sample_mut.R2.fq ` , ` sample_wt.R1.fq ` , ` sample_wt.R2.fq `
52106
53107### Step 2: Check Available Species
54- Before configuring, check what species are available in ` scripts/data_base.txt ` :
108+ Before configuring, check what species are available:
55109
56110``` bash
57- # View available species (first column)
58- cat scripts/data_base.txt | grep -v " ^#" | awk ' {print $1}'
111+ # View available species using Docker
112+ docker run --rm ghcr.io/andraghetti/simple cat /app/ scripts/data_base.txt | grep -v " ^#" | awk ' {print $1}'
59113```
60114
61115** Available species include:**
@@ -69,49 +123,52 @@ cat scripts/data_base.txt | grep -v "^#" | awk '{print $1}'
69123- ` Saccharomyces_cerevisiae `
70124
71125### Step 3: Configure the Analysis
72- Edit ` scripts/simple_variables.sh ` to set your parameters:
73-
74- ``` bash
75- # Change the line name (used as prefix for output files, default is EMS)
76- line=YOUR_LINE_NAME
126+ The pipeline accepts command line arguments that override the default values. You can customize the analysis by passing parameters to the Docker container:
77127
78- # Set mutation type
79- mutation=recessive # or "dominant"
80-
81- # Set species (must match entries in scripts/data_base.txt in organism column)
82- my_species=Arabidopsis_thaliana
83-
84- # CPU cores configuration
85- cpu_cores=" auto" # Use "auto" for all available cores, or specify a number (e.g., 4)
86-
87- # Java memory allocation
88- java_memory=" 8g" # Set RAM for Java tools (e.g., "8g", "16g", "4g")
89- ```
128+ ** Available Parameters:**
129+ - ` --line LINE_NAME ` : Line name (default: EMS)
130+ - ` --mutation TYPE ` : Mutation type: recessive or dominant (default: recessive)
131+ - ` --species SPECIES ` : Species name (default: Arabidopsis_thaliana)
132+ - ` --cpu-cores CORES ` : CPU cores: auto or number (default: auto)
133+ - ` --memory MEMORY ` : Java memory allocation (default: auto)
90134
91135### Step 4: Run the Pipeline
92136
93137#### Option A: Use Pre-built Docker Image (Recommended)
94138``` bash
95139# Pull the pre-built image from GitHub Container Registry
96- # No login required - images are publicly accessible
97- # Docker automatically detects your platform (AMD64/ARM64) and pulls the correct image
98- docker pull ghcr.io/andraghetti/Simple:latest
140+ docker pull ghcr.io/andraghetti/simple:latest
99141
100- # Run the pipeline
142+ # Run the pipeline with default settings
101143docker run --rm \
102- -v $( pwd) /fastq :/app/fastq:ro \
144+ -v $( pwd) /data :/app/data \
103145 -v $( pwd) /runs:/app/runs \
104- ghcr.io/andraghetti/Simple:latest
146+ ghcr.io/andraghetti/simple:latest
147+ ```
148+
149+ Alternative example with all the configurable options:
150+
151+ ``` bash
152+ # Run the pipeline with custom parameters
153+ docker run --rm \
154+ -v $( pwd) /data:/app/data \
155+ -v $( pwd) /runs:/app/runs \
156+ ghcr.io/andraghetti/simple:latest \
157+ --line root_mutant \
158+ --mutation recessive \
159+ --species Arabidopsis_thaliana \
160+ --cpu-cores 8 \
161+ --java-memory 16g
105162```
106163
107164#### Option B: Build Docker Image Locally
108165``` bash
109166# Build with explicit platform specification (works with regular docker build)
110167docker build -t simple-pipeline .
111168
112- # Run the pipeline
169+ # Run the pipeline with default settings
113170docker run --rm \
114- -v $( pwd) /fastq :/app/fastq:ro \
171+ -v $( pwd) /data :/app/data \
115172 -v $( pwd) /runs:/app/runs \
116173 simple-pipeline
117174```
@@ -121,20 +178,10 @@ After completion, check the `runs/` directory for your results:
121178- ` runs/run-YYYYMMDD_HHMMSS/output/YOUR_LINE_NAME.candidates.txt ` - Candidate mutations
122179- ` runs/run-YYYYMMDD_HHMMSS/output/YOUR_LINE_NAME.allSNPs.txt ` - All SNPs for plotting
123180- ` runs/run-YYYYMMDD_HHMMSS/output/YOUR_LINE_NAME.Rplot_*.pdf ` - Manhattan plots
181+ - ` runs/run-YYYYMMDD_HHMMSS/output/snpEff_summary.html ` - snpEff annotation summary
182+ - ` runs/run-YYYYMMDD_HHMMSS/output/snpEff_genes.txt ` - snpEff gene annotations
124183- ` runs/run-YYYYMMDD_HHMMSS/output/log.txt ` - Complete execution log
125- - ` runs/run-YYYYMMDD_HHMMSS/archive/ ` - All intermediate files
126- - ` runs/run-YYYYMMDD_HHMMSS/refs/ ` - Reference files used
127- - ` runs/run-YYYYMMDD_HHMMSS/fastq/ ` - Input FASTQ files
128184
129- ## Features
130-
131- - ** Multi-Architecture Support** : Optimized for both AMD64 and ARM64 (Apple Silicon)
132- - ** Dockerized Environment** : All dependencies pre-installed and compiled
133- - ** Self-Contained Runs** : Each run creates a timestamped directory with all data
134- - ** Pre-compiled Tools** : Latest versions of BWA, samtools, Picard, and snpEff
135- - ** Multi-Core Performance** : Automatically detects and uses all available CPU cores
136- - ** High Memory Allocation** : 8GB RAM (configurable) allocated for Java tools
137- - ** Public Docker Images** : No build time required, freely accessible from GitHub Container Registry
138185
139186### Pipeline Steps
1401871 . ** Reference Preparation** : Downloads and indexes reference genome
@@ -147,27 +194,43 @@ After completion, check the `runs/` directory for your results:
147194## Example Analysis
148195
149196### Root Development Mutant Analysis
150- 1 . ** Prepare files** : ` root_mutant.mut.R1.fastq ` , ` root_mutant.mut.R2.fastq ` , ` root_mutant.wt.R1.fastq ` , ` root_mutant.wt.R2.fastq `
151- 2 . ** Configure** : Set ` line=root_mutant ` , ` mutation=recessive ` , ` my_species=Arabidopsis_thaliana `
152- 3 . ** Run** : Execute the Docker pipeline
153- 4 . ** Results** : Check ` root_mutant.candidates.txt ` for candidate genes affecting root development
154-
155- ## Supported Species
156-
157- The pipeline supports various species listed in ` scripts/data_base.txt ` . Common examples:
158- - Arabidopsis_thaliana
159- - Oryza_sativa_Japonica
160- - Zea_mays
161- - And many more...
197+ 1 . ** Create analysis folder and add files** :
198+ ``` bash
199+ # Create your analysis folder
200+ mkdir root_analysis
201+ cd root_analysis
202+
203+ # Add your FastQ files (copy or download them here)
204+ # Files: root_mutant.mut.R1.fq.gz, root_mutant.mut.R2.fq.gz
205+ # root_mutant.wt.R1.fq.gz, root_mutant.wt.R2.fq.gz
206+ ```
207+
208+ 2 . ** Run the pipeline** :
209+ ``` bash
210+ docker run --rm \
211+ -v $( pwd) /data:/app/data \
212+ -v $( pwd) /runs:/app/runs \
213+ ghcr.io/andraghetti/simple:latest \
214+ --line root_mutant \
215+ --mutation recessive \
216+ --species Arabidopsis_thaliana
217+ ```
218+
219+ 3 . ** Check results** : Look in ` runs/run-YYYYMMDD_HHMMSS/output/root_mutant.candidates.txt ` for candidate genes affecting root development
162220
163221## Troubleshooting
164222
165223### Common Issues
166224
167- 1 . ** Pipeline fails immediately** : Check file naming convention in ` fastq/ ` directory
168- 2 . ** Out of memory errors** : Reduce ` java_memory ` in ` simple_variables.sh `
169- 3 . ** Slow performance** : Ensure ` cpu_cores="auto" ` for maximum performance
170- 4 . ** Missing reference** : Check ` my_species ` matches entries in ` data_base.txt `
225+ 1 . ** Pipeline fails immediately** : Check file naming convention in your analysis directory
226+ - Files must contain "mut" or "wt" AND "R1" or "R2"
227+ - Examples: ` mut.R1.fq.gz ` , ` wt.R1.fastq ` , ` line_mut.R1.fq.gz `
228+ 2 . ** Out of memory errors** : Reduce ` --memory ` parameter (e.g., use ` --memory 8g ` )
229+ 3 . ** Slow performance** : Ensure ` --cpu-cores auto ` for maximum performance
230+ 4 . ** Missing reference** : Check ` --species ` matches entries in ` data_base.txt `
231+ 5 . ** Invalid arguments** : Use ` --help ` to see available options
232+ 6 . ** No files found** : Verify files are in the current directory with correct naming pattern
233+ 7 . ** Permission errors** : Ensure Docker has read/write access to your analysis directory
171234
172235### Getting Help
173236
@@ -181,4 +244,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
181244
182245## Citation
183246
184- If you use this pipeline in your research, please cite the original Simple paper and acknowledge this Dockerized version.
247+ If you use this pipeline in your research, please cite the original Simple paper and acknowledge this optimized version.
0 commit comments