ONT wf-transcriptomes v2.0.2 for DAU validation
Go to file
Neil Horner 61573e1117 Merge branch 'cw-460' into 'dev'
Denovo bug fixes

Closes CW-460

See merge request epi2melabs/workflow-containers/wf-isoforms!42
2022-03-02 11:34:22 +00:00
bin Denovo bug fixes 2022-03-02 11:34:21 +00:00
data Merge de novo pipeline 2022-01-26 15:54:55 +00:00
evaluation Moved fiterable table into aplanat and general tidy up 2022-02-28 14:17:46 +00:00
lib Initial port of ref-isoforms to Nextflow 2021-12-08 14:34:07 +00:00
test_data Merge de novo pipeline 2022-01-26 15:54:55 +00:00
.dockerignore Update .dockerignore duplicate entry 2021-07-29 13:18:18 +00:00
.gitignore Initial port of ref-isoforms to Nextflow 2021-12-08 14:34:07 +00:00
.gitlab-ci.yml Initial port of ref-isoforms to Nextflow 2021-12-08 14:34:07 +00:00
CHANGELOG.md Addded v to changelog version 2022-02-07 11:36:25 +00:00
denovo_assembly.nf Denovo bug fixes 2022-03-02 11:34:21 +00:00
Dockerfile Merge de novo pipeline 2022-01-26 15:54:55 +00:00
environment.yaml Denovo bug fixes 2022-03-02 11:34:21 +00:00
LICENSE Update LICENSE 2021-07-26 09:51:41 +00:00
main.nf Denovo bug fixes 2022-03-02 11:34:21 +00:00
nextflow_schema.json Moved fiterable table into aplanat and general tidy up 2022-02-28 14:17:46 +00:00
nextflow.config Moved fiterable table into aplanat and general tidy up 2022-02-28 14:17:46 +00:00
README.md Denovo bug fixes 2022-03-02 11:34:21 +00:00
reference_assembly.nf Denovo bug fixes 2022-03-02 11:34:21 +00:00

wf-isoforms

This repository contains a nextflow workflow for assembly and annotation of transcripts from Oxford Nanopore cDNA or direct RNA reads.
It has been adapted from two existing Snakemake pipelines:


Overview

  • cDNA or direct RNA reads are initially and optionally preprocessed by pychopper for identification of full-length reads, as well as trimming and orientation correction.

Reference-based approach

  • Full length reads are mapped to a supplied reference genome using minimap2
  • Transcripts are assembled by stringtie in long read mode (with or without a guide reference annotation) to generate the GFF annotation.
  • The annotation generated by the pipeline is compared to the reference annotation using gffcompare

de novo-based approach (experimental!)

  • Sequence clusters are generated using isONclust2
    • If a reference genome is supplied, cluster quality metrics are determined by comparing
      with clusters generated from a minimap2 alignment
  • A consensus sequence for each cluster is generated using spoa
  • Three rounds of polishing using racon and minimap2 to give a final polished CDS for each gene.
  • Full-length reads are then mapped to these polished CDS
  • Transcripts are assembled by stringtie as for the reference-based approach

For both approaches:

  • An html report is generated, which contains various summary statistics and plots of the data.

Quickstart

The workflow uses nextflow to manage compute and software resources, as such nextflow will need to be installed before attempting to run the workflow.

The workflow can currently be run using either Docker, Singularity or conda to provide isolation of the required software. Each method is automated out-of-the-box provided either docker, singularity or conda is installed.

It is not required to clone or download the git repository in order to run the workflow. For more information on running EPI2ME Labs workflows visit out website.

Workflow options

To obtain the workflow, having installed nextflow, users can run:

nextflow run epi2me-labs/wf-isoforms --help

to see the options for the workflow.

Workflow inputs

  • Directory containing cDNA/direct RNA reads. Or a directory containing subdirectories each with reads from different samples (in fastq/fastq.gz format)
  • Reference genome in fasta format (required for reference-based assembly)
  • Optional reference annotation in GFF2/3 format

Example execution of a workflow for reference-based transcript assembly This uses a synthetic SIRV dataset so we need to tell minimap2 about the non-canonical spplice junctions with --minimap2_opts '-uf --splice-flank=no'

OUTPUT=~/output;
nextflow run wf-isoforms/ --fastq test_data/fastq  --ref_genome test_data/SIRV_150601a.fasta --ref_annotation test_data/SIRV_isofroms.gtf
--minimap2_opts '-uf --splice-flank=no' --out_dir outdir -w workspace_dir -profile conda -resume
# To evaluate the workflow on a larger Drosophila dataset
./evaluation/run_evaluation_dmel.sh outdir

Example workflow for denovo transcript assembly

OUTPUT=~/output
nextflow run . --fastq test_data/fastq --denovo --ref_genome test_data/SIRV_150601a.fasta  -profile local --out_dir ${OUTPUT} -w ${OUTPUT}/workspace \
--sample sample_id -resume

A full list of options can be seen in nextflow_schema.json. Below are some commonly used ones. They can be set in the config like this:
   opt = 50
or at the command line:
   --opt 50

  • Threshold for including isoforms into interactive table transcript_table_cov_thresh = 50
  • Run the denovo pipeline denovo = true (default false)

Pychopper and minimap2 can take options via minimap2_opts and pychopper_opts

For example:

  • When using the SIRV synthetic test data
    • minimap2_opts = '-uf --splice-flank=no'
  • pychopper needs to know which cDNA synthesis kit used
    • SQK-PCS109: use pychopper_opts = '-k PCS109' (default)
    • SQK-PCS110: use pychopper_opts = '-k PCS110'
  • pychopper can use one of two available backends for identifying primers in the raw reads
    • nhmmscan pychopper opts = '-m phmm'
    • edlib pychopper opts = '-m edlib'
      Note: edlib is used in the configs as it's quite a lot faster. However it may be less sensitive than nhmmscan.

Workflow outputs

  • wf-isoforms-report.html
    • Summary and plots of reads, alignments and the transcript assembly and annotation
    • One file per run with results from each sample merged

Note transcript isoform table is currently only available for the reference-guilded assembly. Note: If using a large dataset with 10s of thousands of predicted isoforms, to speed up searching, the table can be limited by read coverage, which can be set with transcript_table_cov_thresh = 50 (default 50x)

Output files

Each sample will also have it's own directory containing the following (dependent on assembly approach and input options)

  • {sampleid}_gffcompare
    • Directory containing all output from gffcompare
  • transcripts_{sample_id}.gff
    • Annotation of query transcripts
  • {sample_id}_transcriptome.fas
    • A transcriptome derived from the query reads
  • {sample_id}_merged_transcriptome.fas
    • A transcriptome derived from the query reads + reference annotation
  • merged_transcriptome.fas -A transcriptome made from the combined query reads and reference annotation