Skip to content

barbarahelena/strainflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strainflow: a StrainPhlAn pipeline to assess strainsharing

Nextflow run with conda run with docker run with singularity Cite with Zenodo

Follow on Twitter

Introduction

strainflow is a bioinformatics pipeline that uses StrainPhlan to assess strainsharing between the same subjects at two different timepoints. strainflow

  1. Sample input check
  2. StrainPhlAn to get species-level genome bins (SGBs) and make a table of the number of SNPs between the sample strains and the reference genome based on the strain alignment.
    • Get SGBs
    • Extract markers
    • StrainPhlAn
    • Calculate pairwise distance
    • Calculate optimal threshold to define strainsharing
    • Merge strainsharing tables

Usage

Note

If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.

First, prepare a samplesheet with your input data that looks as follows:

samplesheet.tsv:

sampleID	subjectID	sambz	timepoint
S1000_BA	S1000	data/S1000_BA.sam.bz2	baseline
S1000_FU	S1000	data/S1000_FU.sam.bz2	follow-up

Each row represents a sam.bz2 file resulting from Metaphlan (4.0.5). You will also need the merged profile (txt) table as produced by Metaphlan.

Now, you can run the pipeline using:

nextflow run strainflow/main.nf \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.tsv \
   --profiles metaphlan_merged_profiles.txt \
   --outdir <OUTDIR>

Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

All output of the different parts of the pipeline are stored in subdirectories of the output directory. Other important outputs are the multiqc report in the multiqc folder and the execution html report in the pipeline_info folder.

For more details on the pipeline output, please refer to the output documentation.

Credits

I used the nf-core template as much as possible and used Eduard's strainsharing pipeline and the Biobakery documentation on strainsharing analysis with StrainPhlAn as examples.

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 #strainflow channel (you can join with this invite).

Citations

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.

About

StrainPhlAn pipeline for strainsharing

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published