Skip to content

dhineshp565/sanger_targseq

Repository files navigation

sanger_targseq

Nextflow Docker

A comprehensive Nextflow pipeline for automated analysis of Sanger sequencing data, from raw .ab1 trace files to pathogen identification and phylogenetic analysis.

πŸ”¬ Overview

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

✨ Features

  • πŸ“Š 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

πŸš€ Quick Start

Prerequisites

Basic Usage

# 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/output

Input Structure

Your 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 .txt or .seq - Associated reads files containing sequence data

βš™οΈ Parameters

Required Parameters

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

Example Commands

# 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 Structure

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

πŸ› οΈ Pipeline Workflow

  1. Input Processing: Creates sample list from input directory structure
  2. Tracy Assembly: Assembles .ab1 files into consensus sequences
  3. Quality Control: Generates reverse complement sequences for analysis
  4. Pathogen Typing: Screens sequences against veterinary pathogen database
  5. BLAST Analysis: Searches against reference databases
  6. ORF Prediction: Identifies open reading frames
  7. Phylogenetic Analysis: Multiple alignment and tree construction
  8. Reporting: Generates comprehensive HTML reports with visualizations

πŸ”§ Dependencies

Core Tools (Containerized)

  • 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

πŸ› Troubleshooting

Common Issues

  1. Input directory structure: Verify subdirectories contain .ab1 files
  2. Permission errors: Check file/directory permissions

�️ Software Used

This pipeline integrates the following software tools:

Core Analysis 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

Additional Tools

  • 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

Workflow Management

  • Nextflow (β‰₯22.12.0-edge) - Workflow management system
  • Docker - Containerization platform for reproducible environments

Container Images

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.

πŸ“ License

This project is open source and available under the MIT License.

πŸ‘€ Author

dhineshp565


Version: v1.0.6
Last Updated: September 2025

About

Pipeline for analysis of Sanger sequencing results

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors