Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ jobs:
profile: [conda, docker, singularity]
isMain:
- ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
# Exclude conda and ~singularity~ on dev
# Exclude conda and singularity on dev
exclude:
- isMain: false
profile: "conda"
# - isMain: false
# profile: "singularity"
- isMain: false
profile: "singularity"
Comment thread
piplus2 marked this conversation as resolved.
NXF_VER:
- 26.04.0
- latest-everything
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #272 - Add a `test_leafcutter` profile and a pipeline level nf-test for `--leafcutter`, which had no test coverage at all (by @piplus2)
- #272 - Add the `STRAND_JUNCTIONS` module, which gives the junctions of an unstranded sample a strand from the splice motif and the annotation (by @piplus2)
- #264 - Add an nf-test for the `DEXSEQ_DTU` module, which had no test coverage (by @piplus2)
- #281 - Add an nf-test for the `ISOFORMSWITCHANALYZER` module, which had no test coverage (by @piplus2)
- #281 - Redraw the pipeline metro map with [nf-metro](https://github.com/seqeralabs/nf-metro), now covering LeafCutter, the `--source` inputs and the coverage tracks. The `.mmd` source lives next to the SVG in `docs/images/` (by @piplus2)

### Changed

Expand Down Expand Up @@ -53,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #268 - Move the `EDGER_DEU` subworkflow to the nf-core subworkflow template. It now emits the `EDGER_EXON` results and the featureCounts tables, which it ran but discarded (by @piplus2)
- #270 - Move the `LEAFCUTTER` subworkflow to the nf-core subworkflow template. Its `juncs` output is now the per sample `[ meta, junc ]` tuples, instead of a single list flattening the meta maps in with the paths (by @piplus2)
- #272 - `--leafcutter` now works with `--source genome_bam`, whatever the strandedness, since the junction strand no longer has to come from the alignment. For unstranded libraries the clusters differ slightly from LeafCutter's documented STAR route, see the LeafCutter section of `docs/usage.md` (by @piplus2)
- #281 - Refactor `ISOFORMSWITCHANALYZER` to the nf-core module template and update `IsoformSwitchAnalyzeR` 2.2.0 -> 2.12.0 (R 4.3 -> 4.5). `bin/run_isoformswitchanalyzer.R` is now a module template (by @piplus2)

### Fixed

Expand Down Expand Up @@ -93,6 +96,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #272 - Fix `--leafcutter` clustering nothing. regtools now takes the junction strand from the samplesheet `strandedness`, and the junctions of an unstranded sample are stranded afterwards from the splice motif and the annotation, so the BAM files the other analyses read are left alone (by @piplus2)
- #275 - Fix missing yaml from singularity container in `GTFGENEFILTER` (reported by @srira25, fix by @piplus2)
- #277 - Fix missing pyyaml from singularity container in `STRAND_JUNCTIONS`, `CLUSTERGROUPS` and `MISOPY_SETTINGS` (by @piplus2)
- #281 - Fix `ISOFORMSWITCHANALYZER` writing `common_switch_consequences.pdf` next to the `results` directory instead of inside it, so it was never published (by @piplus2)

## v1.0.5 - 2024-11-03

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**nf-core/rnasplice** is a bioinformatics pipeline for alternative splicing analysis of RNA sequencing data obtained from organisms with a reference genome and annotation.

![nf-core/rnasplice metro map](docs/rnasplice_map.png)
![nf-core/rnasplice metro map](docs/images/nf-core-rnasplice_metro_map.svg)

1. Merge re-sequenced FastQ files ([`cat`](http://www.linfo.org/cat.html))
2. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))
Expand Down
115 changes: 115 additions & 0 deletions docs/images/nf-core-rnasplice_metro_map.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
%%metro title: nf-core/rnasplice
%%metro logo: nf-core-rnasplice_logo_light.png | nf-core-rnasplice_logo_dark.png
%%metro style: nfcore
%%metro center_ports: true
%%metro compact_offsets: true
%%metro files: fastq_in | FASTQ | Reads
%%metro file: genome_bam_in | BAM | Genome
%%metro file: transcriptome_bam_in | BAM | Transcriptome
%%metro dir: salmon_in | Salmon | Quant
%%metro file: bigwig_out | BW | Coverage
%%metro file: report_out | HTML | MultiQC
%%metro off_track: genome_bam_in, transcriptome_bam_in, salmon_in
%%metro line: deu | Differential exon usage (DEU) | #e63946
%%metro line: dtu | Differential transcript usage (DTU) | #4361ee
%%metro line: event | Event-based splicing | #f39c12
%%metro line: qc | QC & visualisation | #2db572
%%metro legend: bl
%%metro grid: preprocessing | 0,0
%%metro grid: alignment | 1,0
%%metro grid: quantification | 1,1
%%metro grid: exon_analysis | 2,0
%%metro grid: transcript_analysis | 2,1
%%metro grid: reporting | 3,0

graph LR
subgraph preprocessing [Pre-processing]
fastq_in[ ]
cat_fastq[cat]
fastqc_raw[FastQC]
trimgalore[Trim Galore!]
fastqc_trim[FastQC]

fastq_in -->|deu,dtu,event,qc| cat_fastq
cat_fastq -->|deu,dtu,event,qc| fastqc_raw
fastqc_raw -->|deu,dtu,event,qc| trimgalore
trimgalore -->|deu,dtu,event,qc| fastqc_trim
end

subgraph alignment [Genome alignment]
genome_bam_in[ ]
star[STAR]
samtools[SAMtools]

star -->|deu,event,qc| samtools
genome_bam_in -->|deu,event,qc| samtools
end

subgraph quantification [Transcript quantification]
transcriptome_bam_in[ ]
salmon_in[ ]
salmon[Salmon]
tximport[tximport]

transcriptome_bam_in -->|dtu,event| salmon
salmon -->|dtu,event| tximport
salmon_in -->|dtu,event| tximport
end

subgraph exon_analysis [Exon & junction based analysis]
htseq[HTSeq]
dexseq_exon[DEXSeq]
featurecounts[featureCounts]
edger[edgeR]
rmats[rMATS]
regtools[regtools]
leafcutter[LeafCutter]

htseq -->|deu| dexseq_exon
featurecounts -->|deu| edger
regtools -->|event| leafcutter
end

subgraph transcript_analysis [Transcript based analysis]
drimseq[DRIMSeq]
dexseq_dtu[DEXSeq]
stager[stageR]
isar[IsoformSwitchAnalyzeR]
suppa_events[SUPPA events]
suppa_psi[SUPPA PSI]
suppa_diff[SUPPA diffSplice]
suppa_cluster[SUPPA cluster]

drimseq -->|dtu| dexseq_dtu
dexseq_dtu -->|dtu| stager
suppa_events -->|event| suppa_psi
suppa_psi -->|event| suppa_diff
suppa_diff -->|event| suppa_cluster
end

subgraph reporting [Visualisation & reporting]
miso[MISO sashimi]
bedtools[BEDTools]
bigwig[bedGraphToBigWig]
multiqc[MultiQC]
bigwig_out[ ]
report_out[ ]

bedtools -->|qc| bigwig
bigwig -->|qc| bigwig_out
multiqc -->|qc| report_out
end

%% Inter-section edges
fastqc_trim -->|deu,dtu,event,qc| star
star -->|dtu,event| salmon
samtools -->|deu| htseq
samtools -->|deu| featurecounts
samtools -->|event| rmats
samtools -->|event| regtools
samtools -->|qc| miso
samtools -->|qc| bedtools
samtools -->|qc| multiqc
tximport -->|dtu| drimseq
tximport -->|event| suppa_events
salmon -->|dtu| isar
337 changes: 337 additions & 0 deletions docs/images/nf-core-rnasplice_metro_map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,13 +413,14 @@ Finally, this portion of the pipeline will run [stageR](https://bioconductor.org
- `02_switch_plot_gene5.pdf`
- `03_switch_plot_gene6.pdf`
- `...`
- `common_switch_consequences.pdf`
- `isoformswitchanalyzer_isoformfeatures.csv`
- `isoformswitchanalyzer_summary.csv`
- `switchlist.rds`

</details>

If [IsoformSwitchAnalyzeR](https://www.bioconductor.org/packages/release/bioc/html/IsoformSwitchAnalyzeR.html) finds genes with isoform switches, it produces plots visualizing these switches. A separate set of switch plots is created for each contrast if that contrast contains significant switches. Further two .csv files are created, a summary and the main results. The .rds of the main R list is also returned.
If [IsoformSwitchAnalyzeR](https://www.bioconductor.org/packages/release/bioc/html/IsoformSwitchAnalyzeR.html) finds genes with isoform switches, it produces plots visualizing these switches. A separate set of switch plots is created for each contrast if that contrast contains significant switches, and `common_switch_consequences.pdf` summarises the consequences of the switches across all contrasts. Further two .csv files are created, a summary and the main results. The .rds of the main R list is also returned.

## Event-based analysis

Expand Down
Binary file removed docs/rnasplice_map.png
Binary file not shown.
7 changes: 7 additions & 0 deletions modules/local/isoformswitchanalyzer/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::bioconductor-isoformswitchanalyzer=2.12.0"
48 changes: 29 additions & 19 deletions modules/local/isoformswitchanalyzer/main.nf
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
process ISOFORMSWITCHANALYZER {
label 'process_medium'

conda "bioconda::bioconductor-isoformswitchanalyzer==2.2.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bioconductor-isoformswitchanalyzer:2.2.0--r43ha9d7317_0' :
'biocontainers/bioconductor-isoformswitchanalyzer:2.2.0--r43ha9d7317_0' }"
conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/bioconductor-isoformswitchanalyzer:2.12.0--r45hd2fad28_0'
: 'biocontainers/bioconductor-isoformswitchanalyzer:2.12.0--r45hd2fad28_0'}"

input:
path salmon_output
path gtf // path to gtf file
path transcript_sequences // path to isoform nt sequences fasta
path samplesheet // path samplesheet
path contrastsheet // path contrastsheet
val alpha // alpha value for differential isoform expression
val dIF // dIF cutoff value for differential isoform expression
path salmon_output // path: one Salmon quant directory per sample
path gtf // path: /path/to/genes.gtf
path transcript_sequences // path: /path/to/transcripts.fa (isoform nucleotide sequences)
path samplesheet // path: /path/to/samplesheet.csv
path contrastsheet // path: /path/to/contrastsheet.csv
val alpha // val: FDR cutoff for the isoform switch test
val dIF // val: minimum absolute difference in isoform fraction

output:
path "isoformswitchanalyzer_summary.csv" , emit: isoformswitchanalyzer_summary
path "isoformswitchanalyzer_isoformfeatures.csv" , emit: isoformswitchanalyzer_isoformFeatures
path "switchlist.rds" , emit: switchlist_rds
path "results" , emit: results
tuple val("${task.process}"), val('r-base'), eval('R --version 2>&1 | head -n 1 | sed "s/^.*version //; s/ .*$//"'), topic: versions, emit: versions_R
tuple val("${task.process}"), val('bioconductor-isoformswitchanalyzer'), eval('Rscript -e "library(IsoformSwitchAnalyzeR); cat(as.character(packageVersion(\'IsoformSwitchAnalyzeR\')))"'), topic: versions, emit: versions_isoformswitchanalyzer

path "isoformswitchanalyzer_summary.csv" , emit: isoformswitchanalyzer_summary
path "isoformswitchanalyzer_isoformfeatures.csv", emit: isoformswitchanalyzer_isoformFeatures
path "switchlist.rds" , emit: switchlist_rds
path "results" , emit: results
path "versions.yml" , topic: versions, emit: versions_isoformswitchanalyzer

when:
task.ext.when == null || task.ext.when

script:
template 'run_isoformswitchanalyzer.R'

stub:
def args = task.ext.args ?: ''
"""
echo ${args}

mkdir -p results
touch isoformswitchanalyzer_summary.csv
touch isoformswitchanalyzer_isoformfeatures.csv
touch switchlist.rds

run_isoformswitchanalyzer.R ${gtf} ${transcript_sequences} ${samplesheet} ${contrastsheet} ${alpha} ${dIF} ${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(R --version 2>&1 | head -n 1 | sed 's/^.*version //; s/ .*\$//')
bioconductor-isoformswitchanalyzer: \$(Rscript -e "library(IsoformSwitchAnalyzeR); cat(as.character(packageVersion('IsoformSwitchAnalyzeR')))")
END_VERSIONS
"""
}
116 changes: 116 additions & 0 deletions modules/local/isoformswitchanalyzer/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "isoformswitchanalyzer"
description: Identify isoform switches between conditions from Salmon quantifications
with IsoformSwitchAnalyzeR, predict their functional consequences and plot the top
switching genes of every contrast
keywords:
- IsoformSwitchAnalyzeR
- isoform switch
- differential transcript usage
- alternative splicing
- salmon
tools:
- "IsoformSwitchAnalyzeR":
description: "Analysis of alternative splicing and isoform switches with predicted
functional consequences (e.g. gain/loss of protein domains etc.) from quantification
of all types of RNASeq by tools such as Kallisto, Salmon, StringTie, Cufflinks/Cuffdiff
etc."
homepage: "https://bioconductor.org/packages/IsoformSwitchAnalyzeR"
documentation: "https://bioconductor.org/packages/release/bioc/vignettes/IsoformSwitchAnalyzeR/inst/doc/IsoformSwitchAnalyzeR.html"
tool_dev_url: "https://github.com/kvittingseerup/IsoformSwitchAnalyzeR"
doi: "10.1093/bioinformatics/btz247"
licence: ["GPL-2.0-or-later"]
identifier: biotools:isoformswitchanalyzer

input:
- salmon_output:
type: directory
description: One Salmon quant directory per sample, each holding a `quant.sf`.
The directory names must match the `sample` column of the samplesheet
pattern: "*"
- gtf:
type: file
description: GTF annotation the transcripts were quantified against
pattern: "*.gtf"
ontologies:
- edam: "http://edamontology.org/format_2306" # GTF
- transcript_sequences:
type: file
description: Nucleotide sequences of the annotated transcripts, named by
transcript id as in the GTF
pattern: "*.{fa,fasta}"
ontologies:
- edam: "http://edamontology.org/format_1929" # FASTA
- samplesheet:
type: file
description: Comma-separated sample sheet with at least `sample` and `condition`
column headers
pattern: "*.csv"
ontologies:
- edam: "http://edamontology.org/format_3752" # CSV
- contrastsheet:
type: file
description: Comma-separated contrast sheet with `treatment` and `control`
column headers naming the conditions to compare. Every pair of conditions
is compared when the file does not exist
pattern: "*.csv"
ontologies:
- edam: "http://edamontology.org/format_3752" # CSV
- alpha:
type: float
description: FDR cutoff below which an isoform switch is called significant
- dIF:
type: float
description: Minimum absolute difference in isoform fraction between the two
conditions for an isoform switch to be called

output:
isoformswitchanalyzer_summary:
- "isoformswitchanalyzer_summary.csv":
type: file
description: Number of switching isoforms, switches and genes per contrast
and combined. Holds the error message instead when no switch was found
pattern: "isoformswitchanalyzer_summary.csv"
ontologies:
- edam: "http://edamontology.org/format_3752" # CSV
isoformswitchanalyzer_isoformFeatures:
- "isoformswitchanalyzer_isoformfeatures.csv":
type: file
description: The `isoformFeatures` table of the switchAnalyzeRlist with the
expression, isoform fraction, switch q-value and consequences of every
isoform in every contrast. Empty when no switch was found
pattern: "isoformswitchanalyzer_isoformfeatures.csv"
ontologies:
- edam: "http://edamontology.org/format_3752" # CSV
switchlist_rds:
- "switchlist.rds":
type: file
description: Serialised switchAnalyzeRlist object
pattern: "switchlist.rds"
results:
- "results":
type: directory
description: One subdirectory per contrast with a switch plot PDF per switching
gene, plus the common switch consequences PDF
pattern: "results"
versions_isoformswitchanalyzer:
- "versions.yml":
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: "http://edamontology.org/format_3750" # YAML

topics:
versions:
- "versions.yml":
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: "http://edamontology.org/format_3750" # YAML
authors:
- "@bensouthgate"
- "@piplus2"
maintainers:
- "@piplus2"
Loading
Loading