Applied Capstone: End-to-End Plant Stress Pipeline & Quarto Reporting
Tested Stacks:
GATK 4.6.1
Samtools 1.21
Nextflow 24.10
Seurat v5.1
Python 3.12
Prerequisites: Basic Linux CLI & Sequencing Formats
PLANT BIOTECHNOLOGY • TRACK 20
CHAPTER 10 OF 10
70 min read • Full Project Scripts • Quarto & GitHub Applied Capstone: End-to-End Plant Stress Pipeline & Quarto Reporting
Complete, reproducible R Markdown / Quarto pipeline script from raw count matrix to biological publication figures, gene tables, and cross-species validation in crop biotechnology.
Phase: Day 4 • Reproducible Capstone
Key Learning Deliverables & Competencies
- End-to-end reproducible R script executing complete multi-factor Solanum tuberosum workflow
- Automated generation of publication tables (.xlsx / .csv) with annotated DEGs and functional terms
- Quarto / R Markdown automated technical report compilation (HTML & PDF)
- Best practice guidelines for plant stress transcriptomics: polyploidy, rRNA depletion, and field validation
1. The Complete End-to-End Plant RNA-Seq Pipeline
Scientific reproducibility demands that every analytical phase—from raw reads to final publication figures—be executable via automated scripts. Below is the master Quarto/RMarkdown workflow template for the Solanum tuberosum drought transcriptomics investigation.
2. Master R Script for Automated Execution
###############################################################################
# Plant Stress RNA-Seq Analysis Workflow: Solanum tuberosum
# Author: OMICS Portal Curriculum Core
# License: MIT Open Access
###############################################################################
suppressPackageStartupMessages({
library(tidyverse)
library(DESeq2)
library(apeglm)
library(pheatmap)
library(EnhancedVolcano)
library(clusterProfiler)
library(openxlsx)
})
# 1. Load Experimental Metadata and Count Matrix
targets <- read.csv("sample_metadata.csv", stringsAsFactors = FALSE)
counts_raw <- read.table("potato_gene_counts.txt", header = TRUE, row.names = 1, skip = 1)
counts <- as.matrix(counts_raw[, 6:ncol(counts_raw)])
colnames(counts) <- targets$Sample_ID
# 2. Build DESeq2 Object and Pre-Filter Low Counts (>= 10 reads in at least 3 samples)
dds <- DESeqDataSetFromMatrix(
countData = counts,
colData = targets,
design = ~ Genotype * Drought_Stage
)
keep <- rowSums(counts(dds) >= 10) >= 3
dds <- dds[keep, ]
# 3. Model Fitting
dds <- DESeq(dds)
# 4. Extract Contrasts & Moderation
res_d7 <- results(dds, contrast = c("Drought_Stage", "D7_Severe", "D0_Control"), alpha = 0.05)
res_d7_shrunk <- lfcShrink(dds, coef = "Drought_Stage_D7_Severe_vs_D0_Control", type = "apeglm")
# 5. Export Publication Results Table
res_export <- as.data.frame(res_d7_shrunk) %>%
rownames_to_column(var = "Gene_ID") %>%
arrange(padj)
write.xlsx(res_export, file = "Table_S1_Drought_DEGs_Solanum_tuberosum.xlsx", asTable = TRUE)
cat("Complete end-to-end plant transcriptomics pipeline executed successfully!\n")
⚠️
Common Pitfalls & Troubleshooting Checklist
- Java Heap Exhaustion (GATK / Picard): If processes terminate with
java.lang.OutOfMemoryError, set your environment variable explicitly:export _JAVA_OPTIONS="-Xmx16g -Djava.io.tmpdir=/tmp". - Index Timestamp Mismatch: If tools complain that a BAM index is missing or out of date, regenerate with
samtools index -@ 4 sample.bam. - Conda Channel Conflicts: Avoid ABI incompatibilities between bioconda and conda-forge by setting strict priority:
conda config --set channel_priority strict. - Chromosome Naming Contamination: Always verify whether reference FASTA headers use
chr1or1; divergent naming causes silent alignment drops.
Was this guide helpful to your research?
Help us maintain 100% accurate, peer-reviewed bioinformatics standards.