Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ribotricer orf prediction #40

Merged
merged 23 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [[#35](https://github.com/nf-core/riboseq/pull/35) - Sortmerna: index once ([@pinin4fjords](https://github.com/pinin4fjords), review by [@maxulysse](https://github.com/maxulysse))
- [[#36](https://github.com/nf-core/riboseq/pull/36) - Bump bbsplit module to prevent index overwrites ([@pinin4fjords](https://github.com/pinin4fjords), review by [@maxulysse](https://github.com/maxulysse))
- [#38](https://github.com/nf-core/riboseq/pull/38) - Important! Template update for nf-core/tools v2.13.1 ([@nf-core-bot](https://github.com/nf-core-bot), [@pinin4fjords](https://github.com/pinin4fjords))
- [#40](https://github.com/nf-core/riboseq/pull/40) - Ribotricer orf prediction ([@pinin4fjords](https://github.com/pinin4fjords), review by )

Initial release of nf-core/riboseq, created with the [nf-core](https://nf-co.re/) template.

Expand Down
32 changes: 32 additions & 0 deletions CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

## Pipeline tools

- [BBMap](https://sourceforge.net/projects/bbmap/)

- [BEDTools](https://pubmed.ncbi.nlm.nih.gov/20110278/)

> Quinlan AR, Hall IM. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics. 2010 Mar 15;26(6):841-2. doi: 10.1093/bioinformatics/btq033. Epub 2010 Jan 28. PubMed PMID: 20110278; PubMed Central PMCID: PMC2832824.

- [fastp](https://www.ncbi.nlm.nih.gov/pubmed/30423086/)

> Chen S, Zhou Y, Chen Y, Gu J. fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics. 2018 Sep 1;34(17):i884-i890. doi: 10.1093/bioinformatics/bty560. PubMed PMID: 30423086; PubMed Central PMCID: PMC6129281.

- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/)

> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online].
Expand All @@ -18,6 +28,28 @@

> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924.

- [Ribo-TISH](https://pubmed.ncbi.nlm.nih.gov/29170441/)

> Zhang P, He D, Xu Y, Hou J, Pan BF, Wang Y, Liu T, Davis CM, Ehli EA, Tan L, Zhou F, Hu J, Yu Y, Chen X, Nguyen TM, Rosen JM, Hawke DH, Ji Z, Chen Y. Genome-wide identification and differential analysis of translational initiation. Nat Commun. 2017 Nov 23;8(1):1749. doi: 10.1038/s41467-017-01981-8. PMID: 29170441; PMCID: PMC5701008.

- [Ribotricer](https://pubmed.ncbi.nlm.nih.gov/31750902/)

> Choudhary S, Li W, D Smith A. Accurate detection of short and long active ORFs using Ribo-seq data. Bioinformatics. 2020 Apr 1;36(7):2053-2059. doi: 10.1093/bioinformatics/btz878. PMID: 31750902; PMCID: PMC7141849.

- [SortMeRNA](https://pubmed.ncbi.nlm.nih.gov/23071270/)

> Kopylova E, Noé L, Touzet H. SortMeRNA: fast and accurate filtering of ribosomal RNAs in metatranscriptomic data Bioinformatics. 2012 Dec 15;28(24):3211-7. doi: 10.1093/bioinformatics/bts611. Epub 2012 Oct 15. PubMed PMID: 23071270.

- [STAR](https://pubmed.ncbi.nlm.nih.gov/23104886/)

> Dobin A, Davis CA, Schlesinger F, Drenkow J, Zaleski C, Jha S, Batut P, Chaisson M, Gingeras TR. STAR: ultrafast universal RNA-seq aligner Bioinformatics. 2013 Jan 1;29(1):15-21. doi: 10.1093/bioinformatics/bts635. Epub 2012 Oct 25. PubMed PMID: 23104886; PubMed Central PMCID: PMC3530905.

- [Trim Galore!](https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/)

- [UMI-tools](https://pubmed.ncbi.nlm.nih.gov/28100584/)

> Smith T, Heger A, Sudbery I. UMI-tools: modeling sequencing errors in Unique Molecular Identifiers to improve quantification accuracy Genome Res. 2017 Mar;27(3):491-499. doi: 10.1101/gr.209601.116. Epub 2017 Jan 18. PubMed PMID: 28100584; PubMed Central PMCID: PMC5340976.

## Software packaging/containerisation tools

- [Anaconda](https://anaconda.com)
Expand Down
50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,43 @@

## Introduction

**nf-core/riboseq** is a bioinformatics pipeline that ...
**nf-core/riboseq** is a bioinformatics pipeline for analysis of ribo-seq data. It borrows heavily from nf-core/rnaseq in the preprocessing stages:

<!-- TODO nf-core:
Complete this sentence with a 2-3 sentence summary of what types of data the pipeline ingests, a brief overview of the
major pipeline sections and the types of output it produces. You're giving an overview to someone new
to nf-core here, in 15-20 seconds. For an example, see https://github.com/nf-core/rnaseq/blob/master/README.md#introduction
-->
1. Merge re-sequenced FastQ files ([`cat`](http://www.linfo.org/cat.html))
2. Sub-sample FastQ files and auto-infer strandedness ([`fq`](https://github.com/stjude-rust-labs/fq), [`Salmon`](https://combine-lab.github.io/salmon/))
3. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))
4. UMI extraction ([`UMI-tools`](https://github.com/CGATOxford/UMI-tools))
5. Adapter and quality trimming ([`Trim Galore!`](https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/))
6. Removal of genome contaminants ([`BBSplit`](http://seqanswers.com/forums/showthread.php?t=41288))
7. Removal of ribosomal RNA ([`SortMeRNA`](https://github.com/biocore/sortmerna))
8. Multiple alignment to both genome and transcriptome using [`STAR`](https://github.com/alexdobin/STAR)
9. Sort and index alignments ([`SAMtools`](https://sourceforge.net/projects/samtools/files/samtools/))
10. UMI-based deduplication ([`UMI-tools`](https://github.com/CGATOxford/UMI-tools))

<!-- TODO nf-core: Include a figure that guides the user through the major workflow steps. Many nf-core
workflows use the "tube map" design for that. See https://nf-co.re/docs/contributing/design_guidelines#examples for examples. -->
<!-- TODO nf-core: Fill in short bullet-pointed list of the default steps in the pipeline -->
Differences occur in the downstream analysis steps. Currently these specialist steps are:

1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))
2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))
1. Check reads distribution around annotated protein coding regions on user provided transcripts, show frame bias and estimate P-site offset for different group of reads ([`Ribo-TISH`](https://github.com/zhpn1024/ribotish))
2. Predict translating open reading frames and/ or translation initiation sites _de novo_ from alignment data ([`Ribo-TISH`](https://github.com/zhpn1024/ribotish))
3. Derive candidate ORFs from reference data and detect translating ORFs from that list ([`Ribotricer`](https://github.com/smithlabcode/ribotricer))

## 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.

<!-- TODO nf-core: Describe the minimum required steps to execute the pipeline, e.g. how to prepare samplesheets.
Explain what rows and columns represent. For instance (please edit as appropriate):

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

`samplesheet.csv`:

```csv
sample,fastq_1,fastq_2
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz
sample,fastq_1,fastq_2,strandedness,type
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz,forward,riboseq
```

Each row represents a fastq file (single-end) or a pair of fastq files (paired end).

-->
Each row represents a fastq file (single-end) or a pair of fastq files (paired end). Each row should have a 'type' value of `riboseq`, `tiseq` or `rnaseq`. Future iterations of the workflow will conduct paired analysis of matched riboseq and rnaseq samples to accomplish analysis types such as 'translational efficiency, but in the current version you should set this to `riboseq` or `tiseq` for reglar ribo-seq or TI-seq data respectively.

Now, you can run the pipeline using:

<!-- TODO nf-core: update the following command to include all required parameters for a minimal example -->

```bash
nextflow run nf-core/riboseq \
-profile <docker/singularity/.../institute> \
Expand All @@ -80,11 +77,12 @@ For more details about the output files and reports, please refer to the

## Credits

nf-core/riboseq was originally written by Maxime U Garcia.
nf-core/riboseq was originally written by [Jonathan Manning](https://github.com/pinin4fjords) (Bioinformatics Engineer as Seqera) with funding from [Altos labs](https://www.altoslabs.com/) and in discussion with [Felix Krueger](https://github.com/FelixKrueger) and [Christel Krueger](https://github.com/ChristelKrueger). We thank the following people for their input:

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

<!-- TODO nf-core: If applicable, make list of people who have also contributed -->
- Anne Bresciani (ZS)
- Mikhail Osipovitch (ZS)
- Edward Wallace (University of Edinburgh)
- Jack Tierney (University College Cork)

## Contributions and Support

Expand All @@ -97,8 +95,6 @@ For further information or help, don't hesitate to get in touch on the [Slack `#
<!-- TODO nf-core: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file. -->
<!-- If you use nf-core/riboseq for your analysis, please cite it using the following doi: [10.5281/zenodo.XXXXXX](https://doi.org/10.5281/zenodo.XXXXXX) -->

<!-- TODO nf-core: Add bibliography of tools and data used in your pipeline -->

An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.

You can cite the `nf-core` publication as follows:
Expand Down
2 changes: 1 addition & 1 deletion conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ process {
withLabel:process_high {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
time = { check_max( 24.h * task.attempt, 'time' ) }
}
withLabel:process_long {
time = { check_max( 20.h * task.attempt, 'time' ) }
Expand Down
31 changes: 31 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -1240,3 +1240,34 @@ if (!params.skip_ribotish) {
}
}
}

if (!params.skip_ribotricer) {
process {
withName: 'RIBOTRICER_PREPAREORFS' {
ext.args = { params.extra_ribotricer_prepareorfs_args ?: '' }
}
withName: 'RIBOTRICER_DETECTORFS' {
ext.args = { params.extra_ribotricer_detectorfs_args ?: '' }
publishDir = [
[
path: { "${params.outdir}/riboseq_qc/ribotricer" },
mode: params.publish_dir_mode,
pattern: "*_{read_length_dist.pdf,metagene_plots.pdf,bam_summary.txt,protocol.txt,metagene_profiles_5p.tsv,metagene_profiles_3p.tsv}",
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
],
[
path: { "${params.outdir}/orf_predictions/ribotricer" },
mode: params.publish_dir_mode,
pattern: "*_{translating_ORFs.tsv,psite_offsets.txt}",
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
],
[
path: { "${params.outdir}/other/ribotricer" },
mode: params.publish_dir_mode,
pattern: "*_{pos.wig,neg.wig}",
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
]
}
}
}
2 changes: 2 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ params {
fasta = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/riboseq_expression/Homo_sapiens.GRCh38.dna.chromosome.20.fa.gz'
gtf = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/riboseq_expression/Homo_sapiens.GRCh38.111_chr20.gtf'
min_trimmed_reads = 1000

skip_ribotricer = true
}
7 changes: 4 additions & 3 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ params {
config_profile_description = 'Full test dataset to check pipeline function'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/riboseq/testdata/samplesheet.csv'
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/riboseq/samplesheet/samplesheet_full.csv'
ribo_database_manifest = 'https://raw.githubusercontent.com/nf-core/test-datasets/riboseq/testdata/rrna-db-full.txt'

fasta = 'http://ftp.ensembl.org/pub/release-110/fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.primary_assembly.fa.gz'
gtf = 'http://ftp.ensembl.org/pub/release-110/gtf/mus_musculus/Mus_musculus.GRCm39.110.gtf.gz'
fasta = 'https://ftp.ensembl.org/pub/release-111/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.primary_assembly.fa.gz'
gtf = 'https://ftp.ensembl.org/pub/release-111/gtf/homo_sapiens/Homo_sapiens.GRCh38.111.gtf.gz'
min_trimmed_reads = 1000
}
36 changes: 32 additions & 4 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [fastp](#fastp) - Adapter and quality trimming
- [BBSplit](#bbsplit) - Removal of genome contaminants
- [SortMeRNA](#sortmerna) - Removal of ribosomal RNA
- [Ribo-TISH quality](#ribotish-quality) - Riboseq QC plots generated with the Ribo-TISH 'quality' command
- [Ribo-TISH quality](#ribo-tish-quality) - Riboseq QC plots generated with the Ribo-TISH 'quality' command
- [Alignment and quantification](#alignment-and-quantification)
- [STAR](#star) - Fast spliced aware genome alignment
- [Alignment post-processing](#alignment-post-processing)
- [SAMtools](#samtools) - Sort and index alignments
- [UMI-tools dedup](#umi-tools-dedup) - UMI-based deduplication
- [picard MarkDuplicates](#picard-markduplicates) - Duplicate read marking
- [ORF prediction](#orf-prediction) - Open reading frame (ORF prediction)
- [Ribo-TISH](#ribotish-predict) - Riboseq ORF predictions by Ribo-TISH
- [ORF prediction](#orf-predictions) - Open reading frame (ORF prediction)
- [Ribo-TISH](#ribo-tish-predict) - Riboseq ORF predictions by Ribo-TISH
- [Ribotricer](#ribotricer-detect-orfs) - Riboseq QC and ORF predictions by Ribotricer
- [Workflow reporting and genomes](#workflow-reporting-and-genomes)
- [Reference genome files](#reference-genome-files) - Saving reference genome indices/files
- [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution
Expand Down Expand Up @@ -226,7 +227,9 @@ After extracting the UMI information from the read sequence (see [UMI-tools extr

## Riboseq-specific QC

reads distribution around annotated protein coding regions on user provided transcripts
Read distribution metrics around annotated protein coding regions or based on alignments alone, plus related metrics.

### Ribo-TISH quality

<details markdown="1">
<summary>Output files</summary>
Expand All @@ -237,8 +240,23 @@ reads distribution around annotated protein coding regions on user provided tran
- `*.para.py`: P-site offsets for different reads lengths in python code dict format
</details>

### Ribotricer detect-orfs QC outputs

<details markdown="1">
<summary>Output files</summary>

- `riboseq_qc/ribotricer/`
- `*_read_length_dist.pdf`: PDF-format read length distribution as quality control
- `*_metagene_plots.pdf`: Metagene plots for quality control
- `*_protocol.txt`: txt file containing inferred protocol if it was inferred (not supplied as input)
- `*_metagene_profiles_5p.tsv`: Metagene profile aligning with the start codon
- `*_metagene_profiles_3p.tsv`: Metagene profile aligning with the stop codon
</details>

## ORF predictions

### Ribo-TISH predict

<details markdown="1">
<summary>Output files</summary>

Expand All @@ -252,6 +270,16 @@ reads distribution around annotated protein coding regions on user provided tran
- `allsamples_transprofile.py` RPF P-site profile for each transcript from Ribo-TISH ran over all samples at once
</details>

### Ribotricer detect-orfs

<details markdown="1">
<summary>Output files</summary>

- `orf_predictions/ribotricer/`
- `*_translating_ORFs.tsv` TSV with ORFs assessed as translating in the assocciated BAM file
- `*_psite_offsets.txt`: If the P-site offsets are not provided, txt file containing the derived relative offsets.
</details>

### MultiQC

<details markdown="1">
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The pipeline will auto-detect whether a sample is single- or paired-end using th
A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice.

```csv title="samplesheet.csv"
sample,fastq_1,fastq_2,strandedness
sample,fastq_1,fastq_2,strandedness,type
CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz,forward,rnaseq
CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz,forward,rnaseq
CONTROL_REP3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz,forward,rnaseq
Expand Down
14 changes: 12 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,22 @@
},
"ribotish/predict": {
"branch": "master",
"git_sha": "21fbfeef55f6988127868eee1d1737217478f0ca",
"git_sha": "d3039382e6943ee8e80016a1e8d7c0f79e21e31e",
"installed_by": ["modules"]
},
"ribotish/quality": {
"branch": "master",
"git_sha": "fac281689037749ea014215a61d431522513077a",
"git_sha": "d3039382e6943ee8e80016a1e8d7c0f79e21e31e",
"installed_by": ["modules"]
},
"ribotricer/detectorfs": {
"branch": "master",
"git_sha": "eef39ece87292a7e11d7f52eec165dbb6e5b696a",
"installed_by": ["modules"]
},
"ribotricer/prepareorfs": {
"branch": "master",
"git_sha": "db0c1159f2d90a0e0ee6753f7299b4ec68439c39",
"installed_by": ["modules"]
},
"rsem/preparereference": {
Expand Down
Loading
Loading