Skip to content

Commit

Permalink
Merge pull request #681 from drpatelh/updates
Browse files Browse the repository at this point in the history
FIx #556
  • Loading branch information
drpatelh authored Jul 28, 2021
2 parents 6da7069 + a56c00c commit 5d3a3fb
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Enhancements & fixes

* Updated pipeline template to [nf-core/tools 2.1](https://github.com/nf-core/tools/releases/tag/2.1)
* [[#556](https://github.com/nf-core/rnaseq/issues/556)] - Genome index isn't recreated with --additional_fasta unless --star_index false
* [[#668](https://github.com/nf-core/rnaseq/issues/668)] - Salmon quant with UMI-tools does not work
* [[#674](https://github.com/nf-core/rnaseq/issues/674)] - Launch pipeline regex fails

Expand Down
34 changes: 34 additions & 0 deletions lib/WorkflowRnaseq.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ class WorkflowRnaseq {
}
}

// Warn if --additional_fasta provided with aligner index
if (!params.skip_alignment && params.additional_fasta) {
def index = ''
if (params.aligner == 'star_salmon' && params.star_index) {
index = 'star'
}
if (params.aligner == 'star_rsem' && params.rsem_index) {
index = 'rsem'
}
if (params.aligner == 'hisat2' && params.hisat2_index) {
index = 'hisat2'
}
if (index) {
additionaFastaIndexWarn(index, log)
}
}

// Check which RSeQC modules we are running
def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : []
if ((valid_params['rseqc_modules'] + rseqc_modules).unique().size() != valid_params['rseqc_modules'].size()) {
Expand Down Expand Up @@ -260,4 +277,21 @@ class WorkflowRnaseq {
" https://github.com/nf-core/rnaseq/issues/568\n" +
"==================================================================================="
}

//
// Print a warning if using '--additional_fasta' and '--<ALIGNER>_index'
//
private static void additionaFastaIndexWarn(index, log) {
log.warn "=============================================================================\n" +
" When using '--additional_fasta <FASTA_FILE>' the aligner index will not\n" +
" be re-built with the transgenes incorporated by default since you have \n" +
" already provided an index via '--${index}_index <INDEX>'.\n\n" +
" Set '--additional_fasta <FASTA_FILE> --${index}_index false --save_reference' to\n" +
" re-build the index with transgenes included and the index will be saved in\n" +
" 'results/genome/index/${index}/' for re-use with '--${index}_index'.\n\n" +
" Ignore this warning if you know that the index already contains transgenes.\n\n" +
" Please see:\n" +
" https://github.com/nf-core/rnaseq/issues/556\n" +
"==================================================================================="
}
}

0 comments on commit 5d3a3fb

Please sign in to comment.