-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
101 lines (72 loc) · 7.22 KB
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{width="600"}
NOTE: THIS PROJECT IS UNDER DEVELOPMENT AND MAY NOT FUNCTION AS EXPECTED UNTIL THIS MESSAGE GOES AWAY
## Introduction {#introduction}
**nf-core/pathogensurveillance** is a population genomic pipeline for pathogen diagnosis, variant detection, and biosurveillance. The pipeline accepts the paths to raw reads for one or more organisms (in the form of a CSV file) and creates reports in the form of interactive HTML reports or PDF documents. Significant features include the ability to analyze unidentified eukaryotic and prokaryotic samples, creation of reports for multiple user-defined groupings of samples, automated discovery and downloading of reference assemblies from NCBI RefSeq, and rapid initial identification based on k-mer sketches followed by a more robust core genome phylogeny and SNP-based phylogeny.
## Usage
> \[!NOTE\] If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.
First, prepare a samplesheet with your input data that looks as follows:
``` bash
nextflow run nf-core/pathogensurveillance -r dev -profile RUN_TOOL,xanthomonas_small -resume --out_dir test_output
```
Note that some form of configuration will be needed so that Nextflow knows how to fetch the required software. This is usually done in the form of a config profile (`RUN_TOOL` in the example command above). You can chain multiple config profiles in a comma-separated string.
> - The pipeline comes with config profiles called `docker`, `singularity`, `podman`, `shifter`, `charliecloud` and `conda` which instruct the pipeline to use the named tool for software management. For example, `-profile xanthomonas_small,docker`.
> - Please check [nf-core/configs](https://github.com/nf-core/configs#documentation) to see if a custom config file to run nf-core pipelines already exists for your Institute. If so, you can simply use `-profile <institute>` in your command. This will enable either `docker` or `singularity` and set the appropriate execution settings for your local compute environment.
> - If you are using `singularity`, please use the [`nf-core download`](https://nf-co.re/tools/#downloading-pipelines-for-offline-use) command to download images first, before running the pipeline. Setting the [`NXF_SINGULARITY_CACHEDIR` or `singularity.cacheDir`](https://www.nextflow.io/docs/latest/singularity.html?#singularity-docker-hub) Nextflow options enables you to store and re-use the images from a central location for future pipeline runs.
> - If you are using `conda`, it is highly recommended to use the [`NXF_CONDA_CACHEDIR` or `conda.cacheDir`](https://www.nextflow.io/docs/latest/conda.html) settings to store the environments in a central location for future pipeline runs.
--\>
Now, you can run the pipeline using:
``` bash
nextflow run nf-core/pathogensurveillance -r dev -profile RUN_TOOL -resume --sample_data <TSV/CSV> --out_dir <OUTDIR> --download_bakta_db
```
``` bash
nextflow run nf-core/pathogensurveillance \
-profile <docker/singularity/.../institute> \
--input samplesheet.tsv \
--outdir <OUTDIR>
```
## Background - why use pathogensurveillance? {#background}
**TL;DR:** **unknown gDNA FASTQ -\> sample ID + phylogeny + publication-quality figures**
Most genomic tools are designed to be used with a reference genome. Yet this is at odds with the work of pathogen diagnosticians, who often deal with unknown samples. Finding the right reference manually may be cumbersome and require a suprising amount of technical skill.
**PathogenSurveillance picks a good reference genome for you**. It does this through the program sourmash. In simple terms, this takes a sample's DNA "fingerprint" and finds the closest match in a "DNA fingerprint library" spanning the tree of life. In more technical terms, the pipeline generates k-mer sketches from your reads assembled into genomes, then uses the identified reference to do a boilerplate, but robust phylogenetic analysis of your submitted samples.
In our experience, the pipeline usually chooses the best possible reference genome. At a minimum it will choose a reference that is good enough to build an informative phylogeny and allow you to see the contextual placement your samples.
Pathogensurveillance is designed to use as many types of genomic DNA input as possible. It works for common shortread and longread sequencing technologies and for both prokaryotes and eukaryotes. There is a good deal of emergent complexity required to work with such a broad sample range, but pathogensurveillance handles this automatically.
While PathogenSurveillance may be a useful tool for researchers of all levels, it was designed with those who may have limited bioinformatics training in mind. **Pathogensurveillance is very simple to run**. At a minimum, all that needs to be supplied is a .CSV file with a single column specifying the path to your sample's sequencing reads. Other information is optional, but if provided will used to customize the output report or conditionally use particular reference genomes.
**pathogensurveillance is particularly good for:**
- unknown sample identification
- exploratory population analysis using minimal input parameters
- inexperienced bioinformatics users
- efficient parallelization of tasks
- repeated analysis (given caching) where you would like to add new samples to a past run
::: callout-note
pathogensurveillance works for non pathogens too!
:::
**pathogensurveillance is not designed for:**
- viral sequence
- non gDNA datasets (DNA assembly fasta files, RNA-seq, RAD-seq, ChIP-seq, etc.)
- mixed/impure samples (this may change in future versions)
- Highly specialized population genetic analysis, or researchers who would like to extensively test parameters at each stage
## Pipeline summary {#pipelinesummary}
{width="700"}
This is a quick breakdown of the processes used by pathogensurveillance:
- Download sequences and references if they are not provided locally
- Genome assembly
- Illumina shortreads: (`spades`)
- Pacbio or Oxford Nanopore longreads: (`flye`)
- Quickly obtain several initial sample references (`bbmap`)
- More accurately select appropriate reference genomes. Genome "sketches" are compared between first-pass references, samples, and any references directly provided by the user (`sourmash`)
- Genome annotation (`bakta`)
- Align reads to reference sequences (`bwa`)
- Variant calling and filtering (`graphtyper`, `vcflib`)
- Determine relationship between samples and references
- Build SNP tree from variant calls (`iqtree`)
- For Prokaryotes:
- Identify shared orthologs (`pirate`)
- Build tree from core genome phylogeny (`iqtree`)
- For Eukaryotes:
- Identify BUSCO genes (`busco`)
- Build tree from BUSCO genes (`iqtree`)
- Generate interactive html report/pdf file
- Sequence and assembly information (`fastqc, multiqc, quast`)
- sample identification tables and heatmaps
- Phylogenetic trees from genome-wide SNPs and core genes
- minimum spanning network