best-practice analysis pipeline that performs phylogenetic placement with EPA-NG.

public public 1yr ago Version: 1.0.0 0 bookmarks

Introduction

nf-core/phyloplace is a bioinformatics best-practice analysis pipeline that performs phylogenetic placement with EPA-NG.

The pipeline is built using Nextflow , a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!

On release, automated continuous integration tests run the pipeline on a full-sized dataset on the AWS cloud infrastructure. This ensures that the pipeline runs on AWS, has sensible resource allocation defaults set to run on real-world datasets, and permits the persistent storage of results to benchmark between pipeline releases and other analysis sources.The results obtained from the full-sized test can be viewed on the nf-core website .

Pipeline summary

  1. Align query sequences to the reference alignment using either HMMER or MAFFT .

  2. Place query sequences in reference phylogeny with EPA-NG .

  3. Graft query sequences onto the reference phylogeny with GAPPA .

  4. If provided with a classification of the reference sequences, classify query sequences with GAPPA .

nf-core/phyloplace workflow overview

Quick Start

  1. Install Nextflow ( >=22.10.1 )

  2. Install any of Docker , Singularity (you can follow this tutorial ), Podman , Shifter or Charliecloud for full pipeline reproducibility (you can use Conda both to install Nextflow itself and also to manage software within pipelines. Please only use it within pipelines as a last resort; see docs ) .

  3. Download the pipeline and test it on a minimal dataset with a single command:

    nextflow run nf-core/phyloplace -profile test,YOURPROFILE --outdir <OUTDIR>
    

    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 ( YOURPROFILE 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 test,docker .

    • Please check nf-core/configs 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 command to download images first, before running the pipeline. Setting the NXF_SINGULARITY_CACHEDIR or singularity.cacheDir 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 settings to store the environments in a central location for future pipeline runs.

  4. Start running your own analysis!

    nextflow run nf-core/phyloplace --input samplesheet.csv --outdir <OUTDIR> -profile <docker/singularity/podman/shifter/charliecloud/conda/institute>
    

Documentation

The nf-core/phyloplace pipeline comes with documentation about the pipeline usage , parameters and output .

Credits

nf-core/phyloplace was originally written by Daniel Lundin.

We thank the following people for their extensive assistance in the development of this pipeline:

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines .

For further information or help, don't hesitate to get in touch on the Slack #phyloplace channel (you can join with this invite ).

Citations

If you use nf-core/phyloplace for your analysis, please cite it using the following doi: 10.5281/zenodo.7643941

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x .

Code Snippets

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
epa-ng \\
    $args \\
    --threads $task.cpus \\
    $queryarg \\
    $refalnarg \\
    $reftreearg \\
    $bfastarg \\
    $binaryarg

if [ -e epa_result.jplace ]; then
    gzip epa_result.jplace
    cp epa_result.jplace.gz ${prefix}.epa_result.jplace.gz
fi
[ -e epa_info.log ]      && cp epa_info.log ${prefix}.epa_info.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    epang: \$(echo \$(epa-ng --version 2>&1) | sed 's/^EPA-ng v//')
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
epa-ng \\
    $args \\
    --split $refaln $fullaln

gzip -c query.fasta > ${prefix}.query.fasta.gz; rm query.fasta
gzip -c reference.fasta > ${prefix}.reference.fasta.gz; rm reference.fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    epang: \$(echo \$(epa-ng --version 2>&1) | sed 's/^EPA-ng v//')
END_VERSIONS
"""
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
gappa \\
    examine assign \\
    $args \\
    --threads $task.cpus \\
    --jplace-path $jplace \\
    --taxon-file $taxonomy \\
    --file-prefix ${prefix}.

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
END_VERSIONS
"""
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
gappa \\
    examine \\
    graft \\
    $args \\
    --threads $task.cpus \\
    --file-prefix ${prefix}. \\
    --jplace-path $jplace

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
END_VERSIONS
"""
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
gappa \\
    examine \\
    heat-tree \\
    --threads $task.cpus \\
    --file-prefix ${prefix}. \\
    --jplace-path $jplace \\
    $args \\
    --log-file ${prefix}.log

grep '^ *At' ${prefix}.log > ${prefix}.colours.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
END_VERSIONS
"""
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""
esl-alimask \\
    $args \\
    $fmask_rfarg \\
    $fmask_allarg \\
    $gmask_rfarg \\
    $gmask_allarg \\
    $pmask_rfarg \\
    $pmask_allarg \\
    -o ${prefix}.masked.sthlm \\
    $unmaskedaln \\
    $maskfile

gzip ${prefix}.*mask*

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    hmmer/easel: \$(esl-reformat -h | grep -o '^# Easel [0-9.]*' | sed 's/^# Easel *//')
END_VERSIONS
"""
26
27
28
29
30
31
32
33
34
35
36
37
"""
esl-reformat \\
    $args \\
    $seqfile \\
    $postproc \\
    | gzip -c > ${prefix}.${suffix}.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    hmmer/easel: \$(esl-reformat -h | grep -o '^# Easel [0-9.]*' | sed 's/^# Easel *//')
END_VERSIONS
"""
24
25
26
27
28
29
30
31
32
33
34
"""
hmmalign \\
    $args \\
    $hmm \\
    $fasta | gzip -c > ${prefix}.sthlm.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    hmmer: \$(hmmalign -h | grep -o '^# HMMER [0-9.]*' | sed 's/^# HMMER *//')
END_VERSIONS
"""
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
hmmbuild \\
    $args \\
    --cpu $task.cpus \\
    -n ${prefix}  \\
    -o ${prefix}.hmmbuild.txt \\
    ${mxfileopt} \\
    ${prefix}.hmm \\
    $alignment

gzip ${prefix}.hmm

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    hmmer: \$(echo \$(hmmbuild -h | grep HMMER | sed 's/# HMMER //' | sed 's/ .*//' 2>&1))
END_VERSIONS
"""
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
mafft \\
    --thread ${task.cpus} \\
    ${args} \\
    ${add} \\
    ${fasta} \\
    > ${prefix}.fas

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    mafft: \$(mafft --version 2>&1 | sed 's/^v//' | sed 's/ (.*)//')
END_VERSIONS
"""
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
multiqc \\
    --force \\
    $args \\
    $config \\
    $extra_config \\
    .

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
END_VERSIONS
"""
43
44
45
46
47
48
49
50
51
52
"""
touch multiqc_data
touch multiqc_plots
touch multiqc_report.html

cat <<-END_VERSIONS > versions.yml
"${task.process}":
    multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
END_VERSIONS
"""
ShowHide 6 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://nf-co.re/phyloplace
Name: phyloplace
Version: 1.0.0
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Downloaded: 0
Copyright: Public Domain
License: None
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...