A comprehensive Nextflow pipeline for automated analysis of Sanger sequencing data, from raw .ab1 trace files to pathogen identification and phylogenetic analysis.
This pipeline streamlines the analysis of Sanger sequencing data for veterinary pathogen detection, providing:
- Consensus assembly from .ab1 trace files
- Pathogen typing using custom databases
- BLAST-based identification
- Phylogenetic analysis with multiple sequence alignment and tree construction
- Comprehensive HTML reports with visualizations
- π Tracy Assembly: Assembles .ab1 trace files into high-quality consensus sequences
- π BLAST Analysis: Performs searches on both consensus sequences and individual reads
- 𧬠Pathogen Typing: Custom abricate database screening for selected veterinary pathogen detection and serotyping
- π³ Phylogenetic Analysis: Multiple sequence alignment (MAFFT) and phylogenetic tree construction (IQ-TREE)
- π Automated Reporting: Generates comprehensive HTML reports with results and visualizations
# Clone the repository
git clone https://github.com/dhineshp565/sanger_targseq.git
cd sanger_targseq
# Run the pipeline
nextflow run main.nf --input /path/to/input --out_dir /path/to/outputYour input directory should contain subdirectories, each with .ab1 trace files and reads files in txt or seq format:
input_directory/
βββ sample1/
β βββ trace1.ab1
β βββ trace1.txt
β βββ trace2.ab1
β βββ trace2.seq
β βββ trace3.ab1
βββ sample2/
β βββ trace1.ab1
β βββ trace1.txt
β βββ trace2.ab1
β βββ trace2.txt
βββ sample3/
βββ trace1.ab1
βββ trace1.seq
File Types:
- Required:
.ab1- Sanger sequencing trace files for consensus assembly.txtor.seq- Associated reads files containing sequence data
| Parameter | Description | Example |
|---|---|---|
--input |
Path to input directory containing subdirectories with .ab1 files | /data/sanger_data/ |
--out_dir |
Output directory path | /results/sanger_analysis/ |
--blastdb_path |
Path to BLAST database | /data/referenceDB/blast/microbe_db |
--blastdb_name |
Name of BLAST database | microbe_db |
# Basic run
nextflow run main.nf --input /data/samples --out_dir /results
# With custom BLAST database
nextflow run main.nf \
--input /data/samples \
--out_dir /results \
--blastdb_path /custom/blast/db \
--blastdb_name custom_db
output_directory/
βββ tracy_assembly/ # Consensus sequences and alignment files
βββ abricate/ # Pathogen typing results
βββ blast_consensus/ # BLAST results for consensus sequences
βββ blast_sanger_reads/ # BLAST results for individual reads
βββ orfipy/ # ORF predictions
βββ seq_length/ # Sequence length statistics
βββ mafft/ # Multiple sequence alignments
βββ iqtree/ # Phylogenetic trees
βββ ggtree/ # Tree visualizations
βββ LIMS/ # Laboratory information management files
βββ execution/ # Pipeline execution reports
βββ sanger_targseq_report.html # Main results report
- Input Processing: Creates sample list from input directory structure
- Tracy Assembly: Assembles .ab1 files into consensus sequences
- Quality Control: Generates reverse complement sequences for analysis
- Pathogen Typing: Screens sequences against veterinary pathogen database
- BLAST Analysis: Searches against reference databases
- ORF Prediction: Identifies open reading frames
- Phylogenetic Analysis: Multiple alignment and tree construction
- Reporting: Generates comprehensive HTML reports with visualizations
- Tracy (v0.7.8): Sanger trace file assembly
- Abricate (v1.0.1): Antimicrobial resistance gene detection
- BLAST+ (v2.16.0): Sequence similarity search
- MAFFT (v7.526): Multiple sequence alignment
- IQ-TREE (v2.4.0): Phylogenetic tree reconstruction
- OrfIpy (v0.0.4): ORF prediction
- R/RMarkdown (v2.10): Report generation
- seqtk (v1.4): Sequence processing utilities
- Input directory structure: Verify subdirectories contain .ab1 files
- Permission errors: Check file/directory permissions
This pipeline integrates the following software tools:
- Tracy (v0.7.8) - Sanger trace file basecalling, alignment, and assembly
- Abricate (v1.0.1) - Mass screening of contigs for antimicrobial resistance and virulence genes
- BLAST+ (v2.16.0) - Basic Local Alignment Search Tool for sequence similarity searches
- MAFFT (v7.526) - Multiple sequence alignment program
- IQ-TREE (v2.4.0) - Efficient phylogenomic software for maximum likelihood phylogenetic inference
- seqtk (v1.4) - Toolkit for processing sequences in FASTA/FASTQ formats
- OrfIpy (v0.0.4) - Fast and flexible tool for extracting ORFs from nucleotide sequences
- R with RMarkdown (v2.10) - Statistical computing and dynamic report generation
- ggtree - Phylogenetic tree visualization and annotation
- Nextflow (β₯22.12.0-edge) - Workflow management system
- Docker - Containerization platform for reproducible environments
All tools are containerized using Docker images from:
- Quay.io Biocontainers
- Docker Hub official repositories
- StaPH-B (State Public Health Bioinformatics) collection
- NCBI official images
Note: Exact container versions and sources can be found in the config/docker.config file.
This project is open source and available under the MIT License.
dhineshp565
- GitHub: @dhineshp565
- Pipeline: sanger_targseq
Version: v1.0.6
Last Updated: September 2025