Skip to content

Running PHoeNIx

Jill V. Hagey, PhD edited this page Jun 16, 2022 · 108 revisions

You should have already set up your config file to make sure Nextflow knows how to run the programs within PHoeNIx. If you haven't already, please review the config set up portion of the install page.

Inputs

PHoeNIx currently only runs on Illumina paired-end reads. Multiple samples can be run using a samplesheet.csv file

nextflow run CDCgov/phoenix -profile <docker/singularity/custom> --input samplesheet.csv

Samplesheet Input

You will need to create a samplesheet with information about the samples you would like to analyze before running the pipeline. Use the --input parameter to specify its location. It must be a comma-separated file (csv) with at least 3 columns and a header row, as shown in the example below. DO NOT HAVE ANY SPACES IN THIS FILE. Do make sure the paths are full paths and not relative. For best results use the automated samplesheet creation scripts described in the automated section below.

--input '[path to samplesheet file]'

Full Samplesheet

The samplesheet can have as many columns as you desire; however, there is a strict requirement for the first 3 columns to match those defined in the table below.

A final samplesheet file consisting of paired-end data may look something like the one below.

sample,fastq_1,fastq_2
SAMPLE_1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz
SAMPLE_2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz
SAMPLE_3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz
Column Description
sample Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (_).
fastq_1 Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz".
fastq_2 Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz".

An example samplesheet has been provided with the pipeline and can be used for testing.

Samplesheet Creation - Automated

A script is available to create a samplesheet from a directory of fastq files. The script will search 1 directory deep and attempt to determine sample id names and pairing/multilane information and will automatically create a samplesheet.

- Please review the samplesheet for accuracy before using it in the pipeline.
phoenix/bin/create_samplesheet.sh <directory of fastq files> > samplesheet.csv

You can change the name of the samplesheet.csv above to anything you want.

Outputs

Output file structure

The output of PHoeNIx is structured like the following:

📦results ┣ 📂SRR17250615
┃ ┣ 📂ANI
┃ ┃ ┣ 📂fastANI
┃ ┃ ┃ ┗ 📜SRR17250615.fastANI.txt
┃ ┃ ┣ 📂mash_dist
┃ ┃ ┃ ┣ 📜SRR17250615.txt
┃ ┃ ┃ ┗ 📜SRR17250615_best_MASH_hits.txt
┃ ┃ ┗ 📜SRR17250615.ani.txt
┃ ┣ 📂Assembly
┃ ┃ ┣ 📜SRR17250615.assembly.gfa.gz
┃ ┃ ┣ 📜SRR17250615.bbmap_filtered.log
┃ ┃ ┣ 📜SRR17250615.contigs.fa.gz
┃ ┃ ┣ 📜SRR17250615.filtered.scaffolds.fa.gz
┃ ┃ ┣ 📜SRR17250615.renamed.scaffolds.fa.gz
┃ ┃ ┣ 📜SRR17250615.scaffolds.fa.gz
┃ ┃ ┗ 📜SRR17250615.spades.log
┃ ┣ 📂BUSCO
┃ ┃ ┣ 📜SRR17250615-auto-busco.batch_summary.txt
┃ ┃ ┣ 📜short_summary.generic.bacteria_odb10.SRR17250615.filtered.scaffolds.fa.json
┃ ┃ ┣ 📜short_summary.generic.bacteria_odb10.SRR17250615.filtered.scaffolds.fa.txt
┃ ┃ ┣ 📜short_summary.specific.enterobacterales_odb10.SRR17250615.filtered.scaffolds.fa.json
┃ ┃ ┗ 📜short_summary.specific.enterobacterales_odb10.SRR17250615.filtered.scaffolds.fa.txt
┃ ┣ 📂fastp_trimd
┃ ┃ ┣ 📜SRR17250615.fastp.html
┃ ┃ ┣ 📜SRR17250615.fastp.json
┃ ┃ ┣ 📜SRR17250615.singles.fastq.gz
┃ ┃ ┣ 📜SRR17250615_1.trim.fastq.gz
┃ ┃ ┣ 📜SRR17250615_2.trim.fastq.gz
┃ ┃ ┣ 📜SRR17250615_raw_read_counts.txt
┃ ┃ ┣ 📜SRR17250615_singles.fastp.html
┃ ┃ ┣ 📜SRR17250615_singles.fastp.json
┃ ┃ ┗ 📜SRR17250615_trimmed_read_counts.txt
┃ ┣ 📂fastqc_stats
┃ ┃ ┣ 📜SRR17250615_1_fastqc.html
┃ ┃ ┣ 📜SRR17250615_1_fastqc.zip
┃ ┃ ┣ 📜SRR17250615_2_fastqc.html
┃ ┃ ┗ 📜SRR17250615_2_fastqc.zip
┃ ┣ 📂gamma_ar
┃ ┃ ┣ 📜SRR17250615_ResGANNCBI_20210507_srst2.gamma
┃ ┃ ┗ 📜SRR17250615_ResGANNCBI_20210507_srst2.psl
┃ ┣ 📂gamma_hv
┃ ┃ ┣ 📜SRR17250615_HyperVirulence_20220414.gamma
┃ ┃ ┗ 📜SRR17250615_HyperVirulence_20220414.psl
┃ ┣ 📂gamma_pf
┃ ┃ ┣ 📜SRR17250615_PF-Replicons_20220414.gamma
┃ ┃ ┗ 📜SRR17250615_PF-Replicons_20220414.psl
┃ ┣ 📂kraken2_asmbld
┃ ┃ ┣ 📂krona
┃ ┃ ┃ ┣ 📜SRR17250615_asmbld.html
┃ ┃ ┃ ┗ 📜SRR17250615_asmbld.krona
┃ ┃ ┣ 📜SRR17250615.asmbld_summary.txt
┃ ┃ ┣ 📜SRR17250615.classified.fastq.gz
┃ ┃ ┣ 📜SRR17250615.kraken2_asmbld.classifiedreads.txt
┃ ┃ ┣ 📜SRR17250615.kraken2_asmbld.report.txt
┃ ┃ ┣ 📜SRR17250615.mpa
┃ ┃ ┗ 📜SRR17250615.unclassified.fastq.gz
┃ ┣ 📂kraken2_asmbld_weighted
┃ ┃ ┣ 📂krona
┃ ┃ ┃ ┣ 📜SRR17250615_wtasmbld.html
┃ ┃ ┃ ┗ 📜SRR17250615_wtasmbld.krona
┃ ┃ ┣ 📜SRR17250615.kraken2_wtasmbld.report.txt
┃ ┃ ┗ 📜SRR17250615.wtasmbld_summary.txt
┃ ┣ 📂kraken2_trimd
┃ ┃ ┣ 📂krona
┃ ┃ ┃ ┣ 📜SRR17250615_trimd.html
┃ ┃ ┃ ┗ 📜SRR17250615_trimd.krona
┃ ┃ ┣ 📜SRR17250615.classified_1.fastq.gz
┃ ┃ ┣ 📜SRR17250615.classified_2.fastq.gz
┃ ┃ ┣ 📜SRR17250615.kraken2_trimd.classifiedreads.txt
┃ ┃ ┣ 📜SRR17250615.kraken2_trimd.report.txt
┃ ┃ ┣ 📜SRR17250615.mpa
┃ ┃ ┣ 📜SRR17250615.trimd_summary.txt
┃ ┃ ┣ 📜SRR17250615.unclassified_1.fastq.gz
┃ ┃ ┗ 📜SRR17250615.unclassified_2.fastq.gz
┃ ┣ 📂mlst
┃ ┃ ┗ 📜SRR17250615.tsv
┃ ┣ 📂quast
┃ ┃ ┗ 📜SRR17250615_report.tsv
┃ ┣ 📂removedAdapters
┃ ┃ ┗ 📜SRR17250615.bbduk.log
┃ ┣ 📂srst2
┃ ┃ ┗ 📜SRR17250615__fullgenes__ResGANNCBI_20210507_srst2__results.txt
┃ ┣ 📜SRR17250615.synopsis
┃ ┣ 📜SRR17250615.tax
┃ ┣ 📜SRR17250615_Assembly_ratio_20210819.txt
┃ ┗ 📜SRR17250615_summaryline.tsv
┣ 📂multiqc
┃ ┣ 📂multiqc_data
┃ ┃ ┣ 📜mqc_fastqc_per_base_n_content_plot_1.txt
┃ ┃ ┣ 📜mqc_fastqc_per_base_sequence_quality_plot_1.txt
┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Counts.txt
┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Percentages.txt
┃ ┃ ┣ 📜mqc_fastqc_per_sequence_quality_scores_plot_1.txt
┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1.txt
┃ ┃ ┣ 📜mqc_fastqc_sequence_duplication_levels_plot_1.txt
┃ ┃ ┣ 📜mqc_fastqc_sequence_length_distribution_plot_1.txt
┃ ┃ ┣ 📜multiqc.log
┃ ┃ ┣ 📜multiqc_data.json
┃ ┃ ┣ 📜multiqc_fastqc.txt
┃ ┃ ┣ 📜multiqc_general_stats.txt
┃ ┃ ┗ 📜multiqc_sources.txt
┃ ┣ 📂multiqc_plots
┃ ┃ ┣ 📂pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_n_content_plot_1.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_sequence_quality_plot_1.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Counts.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Percentages.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_quality_scores_plot_1.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1_pc.pdf
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_duplication_levels_plot_1.pdf
┃ ┃ ┃ ┗ 📜mqc_fastqc_sequence_length_distribution_plot_1.pdf
┃ ┃ ┣ 📂png
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_n_content_plot_1.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_sequence_quality_plot_1.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Counts.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Percentages.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_quality_scores_plot_1.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1_pc.png
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_duplication_levels_plot_1.png
┃ ┃ ┃ ┗ 📜mqc_fastqc_sequence_length_distribution_plot_1.png
┃ ┃ ┗ 📂svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_n_content_plot_1.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_base_sequence_quality_plot_1.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Counts.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_gc_content_plot_Percentages.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_per_sequence_quality_scores_plot_1.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_counts_plot_1_pc.svg
┃ ┃ ┃ ┣ 📜mqc_fastqc_sequence_duplication_levels_plot_1.svg
┃ ┃ ┃ ┗ 📜mqc_fastqc_sequence_length_distribution_plot_1.svg
┃ ┗ 📜multiqc_report.html
┣ 📂pipeline_info
┃ ┣ 📜execution_report_2022-06-16_09-34-32.html
┃ ┣ 📜execution_timeline_2022-06-16_09-34-32.html
┃ ┣ 📜execution_trace_2022-06-16_09-22-14.txt
┃ ┣ 📜execution_trace_2022-06-16_09-24-08.txt
┃ ┣ 📜execution_trace_2022-06-16_09-26-27.txt
┃ ┣ 📜execution_trace_2022-06-16_09-34-32.txt
┃ ┣ 📜pipeline_dag_2022-06-16_09-34-32.svg
┃ ┣ 📜samplesheet.valid.csv
┃ ┗ 📜software_versions.yml
┗ 📜Phoenix_Output_Report.tsv

This is the file tree for running one sample.

Output Overview

The pipeline is built using Nextflow and processes data using the following steps:

  • Add other steps...
  • FastQC - Raw read QC
  • MultiQC - Aggregate report describing results and QC from the whole pipeline
  • Pipeline information - Report metrics generated during the workflow execution

FastQC

Output files
  • fastqc/
    • *_fastqc.html: FastQC report containing quality metrics.
    • *_fastqc.zip: Zip archive containing the FastQC report, tab-delimited data file and plot images.

FastQC gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the FastQC help pages.

MultiQC

Output files
  • multiqc/
    • multiqc_report.html: a standalone HTML file that can be viewed in your web browser.
    • multiqc_data/: directory containing parsed statistics from the different tools used in the pipeline.
    • multiqc_plots/: directory containing static images from the report in various formats.

MultiQC is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory.

Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see http://multiqc.info.

Pipeline information

Output files
  • pipeline_info/
    • Reports generated by Nextflow: execution_report.html, execution_timeline.html, execution_trace.txt and pipeline_dag.dot/pipeline_dag.svg.
    • Reports generated by the pipeline: pipeline_report.html, pipeline_report.txt and software_versions.yml. The pipeline_report* files will only be present if the --email / --email_on_fail parameter's are used when running the pipeline.
    • Reformatted samplesheet files used as input to the pipeline: samplesheet.valid.csv.

Nextflow provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage.

Running on a High-Performance Computing (HPC) Cluster

To run PHoeNIx on an HPC and submit jobs to a cluster you will need to make config file for your executor. We provide a template in the conf folder to edit. Then run the program by running:

nextflow run CDCgov/phoenix -profile singularity,custom_HPC --input samplesheet.csv

Clone this wiki locally