Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequencing Practice Tutorial

Goal

The aim of this project is to learn the basic workflow of analyzing Illumina sequencing data from raw reads to aligned reads and basic downstream analysis.

The focus is on bacterial whole-genome DNA sequencing (not RNA-seq initially), using a small bacterial genome such as E. coli as a practice dataset.

The main concepts to understand are:

  • What raw sequencing reads look like
  • How paired-end sequencing works
  • How FASTQ files store reads and quality scores
  • How reference genomes are stored in FASTA format
  • How reads are aligned to a reference genome
  • How SAM/BAM files represent alignments
  • How to calculate genome coverage from BAM files
  • How sequencing data can later be used for variant analysis

Conceptual workflow

Reference genome
(FASTA)
        |
        |
        +----------------+
                         |
                         v
Raw sequencing reads  --> Alignment
(FASTQ R1/R2)           (Bowtie2)
                         |
                         v
                      SAM file
                         |
                         v
                  BAM file + index
                         |
             +-----------+-----------+
             |                       |
             v                       v
        Coverage                 Variants

File formats

FASTA

Contains reference sequences.

Example:

>chromosome
ATGCGATCGATCG...

Used for:

  • bacterial genomes
  • assembled sequences
  • reference databases

FASTQ

Contains raw sequencing reads.

Each read has:

  1. Identifier
  2. Sequence
  3. Separator
  4. Quality scores

Example:

@read001
ATGCGATCG
+
FFFFFFFF

Paired-end sequencing produces:

sample_R1.fastq
sample_R2.fastq

where R1 and R2 are the two reads originating from the same DNA fragment.


SAM/BAM

Alignment formats.

They store information such as:

  • read name
  • genomic position
  • strand
  • mapping quality
  • paired-end information

BAM is the compressed binary version of SAM.


Tools

The main tools used in this tutorial:

  • fasterq-dump Converts NCBI SRA datasets into FASTQ files.

  • bowtie2 Aligns FASTQ reads against a reference genome.

  • samtools Converts, sorts, indexes, and analyzes BAM files.


Software environment

Create a dedicated conda environment:

conda create -n sequencing-practice -c bioconda \
    sra-tools bowtie2 samtools

Activate:

conda activate sequencing-practice

Practice dataset

Example dataset:

  • Organism: Escherichia coli K-12
  • Data type: Illumina paired-end whole-genome sequencing
  • Source: NCBI Sequence Read Archive (SRA)

Required files:

reference.fasta

sample_R1.fastq.gz
sample_R2.fastq.gz

Obtaining reference genomes from NCBI

datasets download genome accession GCF_000005845.2 --include genome,gff3


Planned exercises

  1. Download sequencing reads from SRA.

We use this dataset: https://www.ncbi.nlm.nih.gov/sra?linkname=bioproject_sra_all&from_uid=203751.

  1. Convert SRA data to FASTQ:
fasterq-dump ACCESSION --split-files
  1. Build a genome index:
bowtie2-build reference.fasta genome_index

The genome index is a somewhat technical idea to go through the reference efficiently.

  1. Align reads:
bowtie2 \
-x genome_index \
-1 sample_R1.fastq \
-2 sample_R2.fastq \
-S alignment.sam
  1. Convert and process alignments:
samtools view -b alignment.sam > alignment.bam

samtools sort alignment.bam -o alignment.sorted.bam

samtools index alignment.sorted.bam
  1. Generate coverage:
samtools depth alignment.sorted.bam > coverage.txt

Key ideas

  • FASTQ = what the sequencer observed.
  • FASTA = what the reference genome is.
  • SAM/BAM = where the observed reads map on the reference.
  • Coverage = how many reads support each genomic position.
  • Annotation files (GFF/GTF) are separate and are used later to interpret genomic positions as genes or other features.

The goal is to understand the complete path:

sequencing machine
        ↓
FASTQ reads
        ↓
alignment
        ↓
BAM file
        ↓
genome-level interpretation

About

A quick and dirty tutorial for students about basic sequencing analysis from Illumina reads.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages