SKILL.md
Genomics Analysis Guide
Overview
Genomic data analysis is the computational backbone of modern molecular biology. From identifying disease-associated variants through Genome-Wide Association Studies (GWAS) to quantifying gene expression with RNA-seq, these workflows transform raw sequencing data into biological insights that drive discoveries in medicine, agriculture, and evolutionary biology.
This guide covers the three most common genomic analysis workflows: RNA-seq differential expression analysis, GWAS for variant-trait associations, and variant calling from whole-genome sequencing (WGS) data. Each workflow is described with tool recommendations, command-line examples, and downstream analysis steps in R and Python.
The emphasis is on reproducibility and best practices. Genomic analyses involve many sequential steps, and errors in early stages propagate through the entire pipeline. Following standardized workflows -- like those from the Broad Institute, ENCODE, and Bioconductor -- reduces the risk of methodological errors.
RNA-seq Analysis Pipeline
Workflow Overview
Raw FASTQ files
|
v
[Quality Control] --> FastQC, MultiQC
|
v
[Trimming] --> Trimmomatic, fastp
|
v
[Alignment] --> STAR, HISAT2
|
v
[Quantification] --> featureCounts, Salmon
|
v
[Differential Expression] --> DESeq2, edgeR
|
v
[Pathway Analysis] --> clusterProfiler, GSEA
Step 1: Quality Control
# Run FastQC on all FASTQ files
fastqc -t 8 -o qc_results/ raw_data/*.fastq.gz
# Aggregate QC reports
multiqc qc_results/ -o multiqc_report/
Step 2: Read Trimming
# fastp for quality trimming and adapter removal
fastp \
--in1 sample_R1.fastq.gz \
--in2 sample_R2.fastq.gz \
--out1 trimmed_R1.fastq.gz \
--out2 trimmed_R2.fastq.gz \
--detect_adapter_for_pe \
--thread 8 \
--html fastp_report.html
Step 3: Alignment with STAR
# Build genome index (one time)
STAR --runMode genomeGenerate \
--genomeDir star_index/ \
--genomeFastaFiles genome.fa \
--sjdbGTFfile annotations.gtf \
--runThreadN 16
# Align reads
STAR --runMode alignReads \
--genomeDir star_index/ \
--readFilesIn trimmed_R1.fastq.gz trimmed_R2.fastq.gz \
--readFilesCommand zcat \
--outSAMtype BAM SortedByCoordinate \
--quantMode GeneCounts \
--outFileNamePrefix sample_ \
--runThreadN 16
