The pipeline consists of several, partly dependent paths
which facilitate the evaluation of aligners using
either DNA- or RNA-Seq data, either real or simulated.
The paths can be executed separately or in a single run.
When running separately or re-running the pipeline
the -resume flag ensures that previously computed
results (or partial results) are reused.
Use the --debug flag to run the whole pipeline or part of it with reduced input data.
There are several ways to execute the pipeline, each requires Nextflow and either Docker or Singularity.
nextflow run csiro-crop-informatics/biokanga-manuscript -profile docker --debug
or on a SLURM cluster
nextflow run csiro-crop-informatics/biokanga-manuscript -profile slurm,singularity,singularitymodule --debug
Note:
singularitymodule profile is used to ensure singularity is available on each execution node by loading an appropriate module.
This may need to be adapted for your system in nextflow.config.module load singularity/3.1.1 prior to running the pipeline.On our cluster, running pipeline version 0.5 consumed 56 CPU-days.
See execution report
and timeline.
This run included each of the input datasets in three replicates. Given the experimental context,
replication does not appear to contribute much, so it may suffice to execute the pipeline with a single replicate using --replicates 1,
thus reducing the CPU-time to under 8 days (based on a run of version 0.6).
The executable for the BEERS-based RNA-Seq evaluation pipeline is beers.nf
For a quick test run use the --debug flag.
In this case only simulated reads from a single dataset and coming from a single human chromosome are aligned to it.
Specific chromosome can be defined using --debugChromosome which defaults to chr21. By default, all pre-defined aligners are executed.
To only specify a single aligner you can e.g. use --aligners biokanga or for several aligners e.g. --alignersRNA 'biokanga|dart|hisat2'.
Additional flag --adapters will make a debug run a bit longer but the output results should be slightly more interesting by including datasets with retained adapters.

TODO
TODO
TODO
We provide several execution profiles, as before, you may use the --debug to test the pipeline and the execution environment before a full run.
nextflow run csiro-crop-informatics/biokanga-manuscript -profile docker
nextflow run csiro-crop-informatics/biokanga-manuscript -profile singularity
If you are new to AWS batch and/or nextflow, follow this blog post, once you are done, or you already use AWS batch, simply run
nextflow run csiro-crop-informatics/biokanga-manuscript \
-profile awsbatch \
-work-dir s3://your_s3_bucket/work \
--outdir s3://your_s3_bucket/results
after replacing your_s3_bucket with a bucket you have created on S3.
Warning! You will be charged by AWS according to your resource use.
There are a few ways to execute the pipeline, all require Nextflow and either Docker or Singularity. See nextflow.config for available execution profiles, e.g. for local execution this could be
nextflow run csiro-crop-informatics/biokanga-manuscript -profile docker
or on a SLURM cluster
nextflow run csiro-crop-informatics/biokanga-manuscript -profile slurm,singularity,singularitymodule
Note that singularitymodule profile is used to ensure singularity is available on each execution node by loading an appropriate module.
This may need to be adapted for your system.
In addition Singularity must also be available on the node where you execute the pipeline.
To run the pipeline on AWS batch, follow the instructions above.
Each pipeline run generates a number of files including
These can be simply collected from the output directories but for full traceability of the results, the following procedure is preferable:
public_repoAccess public repositories
GH_TOKEN='your-token-goes-here'-revision v0.8.3--release flagOn successful completion of the pipeline a series of API calls will be made to
The last of this calls will trigger minting of a DOI for that release if Zenodo integration is configured and enabled for the repository.
Execution environment is captured in runmeta.json.
An aligner may be included for DNA alignment, RNA alignment or both. In each case the same indexing template will be used.
After you have cloned this repository:
templates/index subdirectory.templates/rna and/or templates/dna subdirectories.Let's be more specific and follow an example. We will add bowtie2.
echo \
'#!/usr/bin/env bash
bowtie2-build --threads ${task.cpus} ${ref} ${ref}
> templates/index/bowtie2_index.sh
Applicable nextflow variables resolve as follows:
${task.cpus} - number of cpu threads available to the alignment process${ref} - the reference FASTA path/filename - in this case we use it both to specify the input file and the basename of the generated indexecho -e \
'#!/usr/bin/env bash
bowtie2 \
-p ${task.cpus} \
-x ${idxmeta.target} \
-1 ${r1} \
-2 ${r2} \
-f \
--threads ${task.cpus} \
--local \
> sam' \
> templates/rna/bowtie2_align.sh
Applicable nextflow variables resolve as follows :
${task.cpus} - number of logical cpus available to the alignment process${idxmeta.target} - basename of the index file${r1} and ${r2} - path/filenames of paired-end readsIn addition we have used bowtie's --local flag to increase alignment rates for reads spanning introns.
TODO
Upload a relevant container image to docker hub or locate an existing one. If you opt for an existing one, chose one with a specific version tag and a Dockerfile. Alternatively, follow our procedure below for defining per-tool container images and docker automated builds
Insert container specification
withLabel: bowtie2 {
quay.io/biocontainers/bowtie2:2.3.5--py27he860b03_0
}
within the process { } block in conf/containers.config.
We opt for docker containers which can also be executed using singularity. Container images are pulled from docker hub, but nextflow is able to access other registries and also local images, see relevant nextflow documentation
Dockerfiles for individual tools used can be found under dockerfiles/.
This includes various aligners but also other tools used by the pipeline.
For each tool we created a docker hub/cloud repository and configured automated builds.
Builds can be triggered from branches and tags.
The following approach relies on creating a branch for a specific version of a tool.
The same can be achieved by simply tagging the relevant commit, but this may result in proliferation of tags while branches can be merged into master and deleted while preserving the history.
If you'd rather use tags, in (2) change the 'Source type' below to 'Tag' and later tag an appropriate commit using (tags can be problematic - if tag is based on version of a tool and container needs to be updated, tags may have to be removed/re-added)docker/tool/version pattern rather than committing to a dedicated branch.
tool with the name of the tool).| Source type | Source | Docker Tag | Dockerfile location | Build Context |
|---|---|---|---|---|
| Branch | /^docker\/tool\/(.*)$/ | {\1} | tool.Dockerfile | /dockerfiles |
Checkout a new branch replacing tool and version with the intended tool name and version, respectively.
For example,
tool='bwa'
version='0.7.17'
git checkout -b docker/${tool}/${version}
Add or modify dockerfiles/${tool}.Dockerfile as required.
Commit and push to trigger an automated build
git add dockerfiles/${tool}.Dockerfile
git commit
git push --set-upstream origin docker/${tool}/${version}
This should trigger an automated build in the linked Docker Hub/cloud repository. If everything works as intended, you may update conf/containers.config to the new tool version
Then either create a PR to merge the new branch into master or, if you have write permissions for this repository or working on your fork of it, checkout master and merge.
git checkout master
git merge docker/${tool}/${version}
TODO: add information on
If report template is sufficiently generic we will be able to easily render to html and PDF, otherwise we should settle for HTML(?).
Rendering of the report constitutes the final step of the pipeline and relies on a container defined in dockerfiles/renderer.Dockerfile for rendering environment.
There are several ways for rendering of the report outside the pipeline, with docker being the preferred option.
docker run --rm --user $(id -u):$(id -g) \
--volume $(pwd)/report:/report \
--workdir /report rsuchecki/renderer:0.2 ./render.R
singularity exec --pwd $(pwd)/report docker://rsuchecki/renderer:0.1 ./render.R
If you'd like to render the report without docker/singularity, you will need the following:
R e.g. on ubuntu sudo apt apt install r-base-corepandoc e.g. on ubuntu sudo apt install pandoc pandoc-citeprocLaTeX e.g. on ubuntu sudo apt install texlive texlive-latex-extraR packages:
rmarkdownrticlesbookdownThen:
cd report && ./render.R
Manuscript source is under manuscript/ sub directory on manuscript branch which should not be merged into master.
Application note is drafted in RMarkdown in manuscript/biokanga-manuscript.Rmd file.
RMarkdown is well integrated in RStudio, but can be written/edited in a text editor of your choice.
The manuscript will be rendered the pipeline is executed while manuscript branch is checked out, either
-revision manuscript at run-timeAppropriate revision of the master branch should first be mnerged into the manuscript branch.
The manuscript can be rendered outside the pipeline in a fashion analogous to how this can be done for the report,
just replace any use of report by manuscript.
Among the alternatives available we opted for BibTeX, see writing/references.bib.
Content type
Image
Digest
Size
14.7 MB
Last updated
over 7 years ago
docker pull rsuchecki/gffread:0.11.4_32ec4f0a9d4c9acbbe9b93c0e6c2da3e9f60e097