Skip to content

Commit

Permalink
Merge pull request #921 from drpatelh/fixes
Browse files Browse the repository at this point in the history
Fix #919
  • Loading branch information
drpatelh authored Jan 5, 2023
2 parents a5e1920 + d7cd968 commit a147b4e
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 51 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unpublished Version / DEV]
## [[3.10.1](https://github.com/nf-core/rnaseq/releases/tag/3.10.1)] - 2023-01-05

### Enhancements & fixes

- [[#919](https://github.com/nf-core/rnaseq/issues/919)] - Salmon quant not run after FastQ subsampling if index not provided
- [[#922](https://github.com/nf-core/rnaseq/issues/922)] - Passing TrimGalore `--hardtrim3` / `--hardtrim5` via custom config raises missing output filename error

## [[3.10](https://github.com/nf-core/rnaseq/releases/tag/3.10)] - 2022-12-21

### Enhancements & fixes
Expand Down
20 changes: 11 additions & 9 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ nextflow.enable.dsl = 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')
params.gtf = WorkflowMain.getGenomeAttribute(params, 'gtf')
params.gff = WorkflowMain.getGenomeAttribute(params, 'gff')
params.gene_bed = WorkflowMain.getGenomeAttribute(params, 'bed12')
params.bbsplit_index = WorkflowMain.getGenomeAttribute(params, 'bbsplit')
params.star_index = WorkflowMain.getGenomeAttribute(params, 'star')
params.hisat2_index = WorkflowMain.getGenomeAttribute(params, 'hisat2')
params.rsem_index = WorkflowMain.getGenomeAttribute(params, 'rsem')
params.salmon_index = WorkflowMain.getGenomeAttribute(params, 'salmon')
params.fasta = WorkflowMain.getGenomeAttribute(params, 'fasta')
params.transcript_fasta = WorkflowMain.getGenomeAttribute(params, 'transcript_fasta')
params.additional_fasta = WorkflowMain.getGenomeAttribute(params, 'additional_fasta')
params.gtf = WorkflowMain.getGenomeAttribute(params, 'gtf')
params.gff = WorkflowMain.getGenomeAttribute(params, 'gff')
params.gene_bed = WorkflowMain.getGenomeAttribute(params, 'bed12')
params.bbsplit_index = WorkflowMain.getGenomeAttribute(params, 'bbsplit')
params.star_index = WorkflowMain.getGenomeAttribute(params, 'star')
params.hisat2_index = WorkflowMain.getGenomeAttribute(params, 'hisat2')
params.rsem_index = WorkflowMain.getGenomeAttribute(params, 'rsem')
params.salmon_index = WorkflowMain.getGenomeAttribute(params, 'salmon')

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
8 changes: 4 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"salmon/index": {
"branch": "master",
"git_sha": "94b06f1683ddf893cf06525f6e7f0573ad8fbf83",
"installed_by": ["modules"]
"installed_by": ["fastq_subsample_fq_salmon"]
},
"salmon/quant": {
"branch": "master",
Expand Down Expand Up @@ -192,7 +192,7 @@
},
"trimgalore": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "72ffbd7128015a1d4b65b95ff8d37be8fee2f981",
"installed_by": ["fastq_fastqc_umitools_trimgalore"]
},
"ucsc/bedclip": {
Expand Down Expand Up @@ -265,12 +265,12 @@
},
"fastq_fastqc_umitools_trimgalore": {
"branch": "master",
"git_sha": "b51a69e30973c71950225c817ad07a3337d22c40",
"git_sha": "72ffbd7128015a1d4b65b95ff8d37be8fee2f981",
"installed_by": ["subworkflows"]
},
"fastq_subsample_fq_salmon": {
"branch": "master",
"git_sha": "0098bc93f6219c6194f443f0feb089ba83717384",
"git_sha": "82d60046b4519e9dbef4a934371a53fa7666eabc",
"installed_by": ["subworkflows"]
}
}
Expand Down
13 changes: 6 additions & 7 deletions modules/nf-core/trimgalore/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/nf-core/trimgalore/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ params {

// References
genome = null
transcript_fasta = null
additional_fasta = null
splicesites = null
gtf_extra_attributes = 'gene_name'
gtf_group_features = 'gene_id'
Expand Down Expand Up @@ -256,7 +254,7 @@ manifest {
description = """RNA sequencing analysis pipeline for gene/isoform quantification and extensive quality control."""
mainScript = 'main.nf'
nextflowVersion = '!>=22.10.1'
version = '3.11dev'
version = '3.10.1'
doi = 'https://doi.org/10.5281/zenodo.1400710'
}

Expand Down
16 changes: 8 additions & 8 deletions subworkflows/local/prepare_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ workflow PREPARE_GENOME {
// Uncompress Salmon index or generate from scratch if required
//
ch_salmon_index = Channel.empty()
if ('salmon' in prepare_tool_indices) {
if (params.salmon_index) {
if (params.salmon_index.endsWith('.tar.gz')) {
ch_salmon_index = UNTAR_SALMON_INDEX ( [ [:], params.salmon_index ] ).untar.map { it[1] }
ch_versions = ch_versions.mix(UNTAR_SALMON_INDEX.out.versions)
} else {
ch_salmon_index = file(params.salmon_index)
}
if (params.salmon_index) {
if (params.salmon_index.endsWith('.tar.gz')) {
ch_salmon_index = UNTAR_SALMON_INDEX ( [ [:], params.salmon_index ] ).untar.map { it[1] }
ch_versions = ch_versions.mix(UNTAR_SALMON_INDEX.out.versions)
} else {
ch_salmon_index = file(params.salmon_index)
}
} else {
if ('salmon' in prepare_tool_indices) {
ch_salmon_index = SALMON_INDEX ( ch_fasta, ch_transcript_fasta ).index
ch_versions = ch_versions.mix(SALMON_INDEX.out.versions)
}
Expand Down
14 changes: 9 additions & 5 deletions subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion subworkflows/nf-core/fastq_subsample_fq_salmon/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions subworkflows/nf-core/fastq_subsample_fq_salmon/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions workflows/rnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ workflow RNASEQ {
//
FASTQ_SUBSAMPLE_FQ_SALMON (
ch_strand_fastq.auto_strand,
PREPARE_GENOME.out.fasta,
PREPARE_GENOME.out.transcript_fasta,
PREPARE_GENOME.out.gtf,
PREPARE_GENOME.out.salmon_index,
ch_dummy_file,
PREPARE_GENOME.out.gtf
!params.salmon_index && !('salmon' in prepareToolIndices)
)
ch_versions = ch_versions.mix(FASTQ_SUBSAMPLE_FQ_SALMON.out.versions)

Expand Down Expand Up @@ -268,16 +270,20 @@ workflow RNASEQ {
ch_filtered_reads = FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.reads
if (!params.skip_trimming) {
ch_filtered_reads
.join(FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_log)
.join(FASTQ_FASTQC_UMITOOLS_TRIMGALORE.out.trim_log, remainder: true)
.map {
meta, reads, trim_log ->
if (!meta.single_end) {
trim_log = trim_log[-1]
if (trim_log) {
if (!meta.single_end) {
trim_log = trim_log[-1]
}
num_reads = WorkflowRnaseq.getTrimGaloreReadsAfterFiltering(trim_log)
[ meta, reads, num_reads ]
} else {
[ meta, reads, params.min_trimmed_reads + 1 ]
}
num_reads = WorkflowRnaseq.getTrimGaloreReadsAfterFiltering(trim_log)
[ meta, reads, num_reads ]
}
.set { ch_num_trimmed_reads }
.set { ch_num_trimmed_reads }

ch_num_trimmed_reads
.map { meta, reads, num_reads -> if (num_reads > params.min_trimmed_reads) [ meta, reads ] }
Expand Down

0 comments on commit a147b4e

Please sign in to comment.