Skip to content

henningonsbring/taxman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taxman logo

taxman

taxman is a Nextflow workflow for assembling paired-end FASTQ reads and generating taxonomic summaries using DIAMOND alignments against the NCBI NR database. An optional read downsampling step is included to enable fair cross-library comparisons.

The final step of the pipeline outputs a summary. Only the first few lines are shown below to illustrate the format:

TAXA QUANTIFICATION SUMMARY
 
Species                                       Count    Percent
 
Haemophilus influenzae                          715     49.41%
Cutibacterium acnes                              62      4.28%
Pasteurella multocida                            57      3.94%

Input requirements

  • Paired-end FASTQ files following this naming pattern: *_R[12]_*.fastq.gz

  • A DIAMOND NR database built with taxonomy support

Typical usage

nextflow run main.nf \
  --prefix SAMPLE_ID \
  --directory /path/to/fastq_directory \
  --outdir /path/to/output_directory \
  --subsample_reads NUM \
  --assembly_mode rna

See the supported assembly mode options in the SPAdes documentation.
If the --assembly_mode flag is omitted, SPAdes will use its default assembly mode, which is genome assembly.

Getting started

1. Install dependencies

The following tools must be installed and available on your system:

2. Configure executable paths

Ensure the following tools are available in your PATH:

  • fastp
  • seqtk
  • SPAdes
  • DIAMOND aligner

Alternatively, specify the full paths to these executables in nextflow.config.

3. Download database resources

Download the required NR and taxonomy files from NCBI:

wget ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/nr.gz
wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/prot.accession2taxid.gz
wget ftp://ftp.ncbi.nlm.nih.gov/pub/taxonomy/taxdump.tar.gz

Extract the taxonomy dump:

tar -xzf taxdump.tar.gz

4. Build the DIAMOND database

Create a DIAMOND NR database with taxonomy support:

diamond makedb \
  --no-parse-seqids \
  --in nr.gz \
  -d nr_diamond_taxonomy.db \
  --taxonmap prot.accession2taxid.gz \
  --taxonnodes taxdump/nodes.dmp \
  --taxonnames taxdump/names.dmp

5. Configure database path

Add the path to the generated DIAMOND database in nextflow.config.

About

Workflow to assemble FASTQ reads and generate taxonomic summaries using DIAMOND NR alignments, with optional downsampling for cross-library comparison.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors