Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Report 02 - Sequence Alignment with BWA: E. coli and Mus musculus ChIP-seq

A sequence alignment pipeline for ChIP-seq data using BWA, developed for the "Bioinformatics II" module in the Genomic Sciences program at UNAM Juriquilla.

Overview

This project implements a complete alignment pipeline including:

  • Reference genome indexing with BWA
  • Read alignment for ChIP-seq experiments
  • Quality control of raw sequences with FastQC
  • Alignment quality assessment with samtools

Data

The analysis uses two datasets:

Escherichia coli K12 MG1655

  • Reference genome: Escherichia_coli_K12_MG1655.fasta
  • ChIP-seq reads: SRX189773_FNR_ChIP.fastq (FNR transcription factor)

Mus musculus (mm10)

  • Reference genome: GRCm38 (mm10.fa)
  • ChIP-seq reads: mus_musculus_CEBPA_liver_ERR005132.fastq.gz (CEBPA, liver tissue)

Pipeline

Step Command/Script Description
1 bwa index Generate genome index files (.amb, .ann, .bwt, .pac, .sa)
2 fastqc Quality control of raw reads
3 bwa aln + bwa samse Align single-end reads (short reads)
3 (alt) bwa mem Align reads using MEM algorithm (longer reads)
4 samtools stats/flagstat Alignment quality assessment

Key Commands

Genome Indexing

bwa index -p E_index -a bwtsw Escherichia_coli_K12_MG1655.fasta

Read Alignment (E. coli)

# Generate alignment candidates
bwa aln E_index SRX189773_FNR_ChIP.fastq > Escherichia.sai

# Convert to SAM format
bwa samse E_index Escherichia.sai SRX189773_FNR_ChIP.fastq > Escherichia.sam

Read Alignment (M. musculus)

bwa mem -M -t 8 /path/to/mm10.fa reads.fastq.gz > Mus_alg.sam

Quality Assessment

samtools stats alignment.sam | grep 'SN'
samtools flagstat alignment.sam

Results Summary

E. coli FNR ChIP-seq

Metric Value
Total reads 3,603,544
Mapped reads 2,351,791 (65%)
Multi-mapped (MQ0) 85,370 (2.4%)
Error rate 0.2%
Mean quality 34.6 (Phred)

M. musculus CEBPA ChIP-seq

Metric Value
Read length 42 bp
GC content 45%
Mapped reads 6,530,881
Unmapped reads 10,640,249
Error rate 2.1%

Note: The M. musculus dataset showed significant quality issues (mean Phred ~18.7), likely due to sequencing errors. Results should be interpreted with caution.

Dependencies

# Load modules (cluster environment)
module load bwa/0.7.15
module load samtools/1.9
module load fastqc/0.11.3

Usage

  1. Set up working directory and copy required files
  2. Index reference genome (if not pre-indexed)
  3. Run FastQC on raw reads
  4. Perform alignment with BWA
  5. Assess alignment quality with samtools

For large genomes (M. musculus), submit jobs via SGE:

qsub MusculusAlignment.sge

Output

  • *.sai: BWA alignment index files
  • *.sam: Sequence Alignment/Map format files
  • *_fastqc.html: FastQC quality reports
  • Alignment statistics from samtools

Authors

Jessica Garcia, Manuel Rivera, Axel Rodriguez Perez
Genomic Sciences, UNAM · February 2023

About

This repo contains data and code used in the realization of the second report of the module "Sequence Alignment"

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages