mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 19:39:54 +00:00
Merge pull request #180 from nf-core/rename-exclude-unmerged
refactor: change parameter exclude unmerged to include
This commit is contained in:
commit
9064584356
7 changed files with 13 additions and 17 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -28,10 +28,10 @@ jobs:
|
||||||
- "--perform_longread_qc false"
|
- "--perform_longread_qc false"
|
||||||
- "--perform_shortread_qc false"
|
- "--perform_shortread_qc false"
|
||||||
- "--shortread_qc_tool fastp"
|
- "--shortread_qc_tool fastp"
|
||||||
- "--shortread_qc_tool fastp --shortread_qc_mergepairs --shortread_qc_excludeunmerged"
|
- "--shortread_qc_tool fastp --shortread_qc_mergepairs --shortread_qc_includeunmerged"
|
||||||
- "--shortread_qc_tool fastp --shortread_qc_mergepairs"
|
- "--shortread_qc_tool fastp --shortread_qc_mergepairs"
|
||||||
- "--shortread_qc_tool adapterremoval"
|
- "--shortread_qc_tool adapterremoval"
|
||||||
- "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs --shortread_qc_excludeunmerged"
|
- "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs --shortread_qc_includeunmerged"
|
||||||
- "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs"
|
- "--shortread_qc_tool adapterremoval --shortread_qc_mergepairs"
|
||||||
- "--shortread_complexityfilter_tool bbduk"
|
- "--shortread_complexityfilter_tool bbduk"
|
||||||
- "--shortread_complexityfilter_tool prinseqplusplus"
|
- "--shortread_complexityfilter_tool prinseqplusplus"
|
||||||
|
|
|
@ -79,7 +79,7 @@ process {
|
||||||
withName: FASTP_PAIRED {
|
withName: FASTP_PAIRED {
|
||||||
ext.args = [
|
ext.args = [
|
||||||
// collapsing options - option to retain singletons
|
// collapsing options - option to retain singletons
|
||||||
params.shortread_qc_excludeunmerged ? '' : "--include_unmerged",
|
params.shortread_qc_includeunmerged ? '--include_unmerged' : '',
|
||||||
// trimming options
|
// trimming options
|
||||||
params.shortread_qc_skipadaptertrim ? "--disable_adapter_trimming" : "",
|
params.shortread_qc_skipadaptertrim ? "--disable_adapter_trimming" : "",
|
||||||
params.shortread_qc_adapterlist ? "" : params.shortread_qc_adapter1 ? "--adapter_sequence ${params.shortread_qc_adapter1}" : "",
|
params.shortread_qc_adapterlist ? "" : params.shortread_qc_adapter1 ? "--adapter_sequence ${params.shortread_qc_adapter1}" : "",
|
||||||
|
|
|
@ -204,7 +204,7 @@ It is highly recommended to run this on raw reads to remove artifacts from seque
|
||||||
There are currently two options for short-read preprocessing: `fastp` or `adapterremoval`.
|
There are currently two options for short-read preprocessing: `fastp` or `adapterremoval`.
|
||||||
|
|
||||||
For adapter clipping, you can either rely on tool default adapter sequences, or supply your own adapters (`--shortread_qc_adapter1` and `--shortread_qc_adapter2`)
|
For adapter clipping, you can either rely on tool default adapter sequences, or supply your own adapters (`--shortread_qc_adapter1` and `--shortread_qc_adapter2`)
|
||||||
By default, paired-end merging is not activated and paired-end profiling is performed where supported otherwise pairs will be independently profiled. If paired-end merging is activated you can also specify whether to exclude unmerged reads in the reads sent for profiling (`--shortread_qc_mergepairs` and `--shortread_qc_excludeunmerged`).
|
By default, paired-end merging is not activated and paired-end profiling is performed where supported otherwise pairs will be independently profiled. If paired-end merging is activated you can also specify whether to include unmerged reads in the reads sent for profiling (`--shortread_qc_mergepairs` and `--shortread_qc_includeunmerged`).
|
||||||
You can also turn off clipping and only perform paired-end merging, if requested. This can be useful when processing data downloaded from the ENA, SRA, or DDBJ (`--shortread_qc_skipadaptertrim`).
|
You can also turn off clipping and only perform paired-end merging, if requested. This can be useful when processing data downloaded from the ENA, SRA, or DDBJ (`--shortread_qc_skipadaptertrim`).
|
||||||
Both tools support length filtering of reads and can be tuned with `--shortread_qc_minlength`. Performing length filtering can be useful to remove short (often low sequencing complexity) sequences that result in unspecific classification and therefore slow down runtime during profiling, with minimal gain.
|
Both tools support length filtering of reads and can be tuned with `--shortread_qc_minlength`. Performing length filtering can be useful to remove short (often low sequencing complexity) sequences that result in unspecific classification and therefore slow down runtime during profiling, with minimal gain.
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ params {
|
||||||
shortread_qc_tool = 'fastp'
|
shortread_qc_tool = 'fastp'
|
||||||
shortread_qc_skipadaptertrim = false
|
shortread_qc_skipadaptertrim = false
|
||||||
shortread_qc_mergepairs = true
|
shortread_qc_mergepairs = true
|
||||||
shortread_qc_excludeunmerged = false
|
shortread_qc_includeunmerged = false
|
||||||
shortread_qc_adapter1 = null
|
shortread_qc_adapter1 = null
|
||||||
shortread_qc_adapter2 = null
|
shortread_qc_adapter2 = null
|
||||||
shortread_qc_adapterlist = null
|
shortread_qc_adapterlist = null
|
||||||
|
|
|
@ -125,11 +125,11 @@
|
||||||
"default": true,
|
"default": true,
|
||||||
"help_text": "Turn on the merging of read-pairs of paired-end short read sequencing data for AdapterRemoval (this is performed automatically with fastp).\n\n> Modifies tool parameter(s):\n> - AdapterRemoval: `--collapse`\n"
|
"help_text": "Turn on the merging of read-pairs of paired-end short read sequencing data for AdapterRemoval (this is performed automatically with fastp).\n\n> Modifies tool parameter(s):\n> - AdapterRemoval: `--collapse`\n"
|
||||||
},
|
},
|
||||||
"shortread_qc_excludeunmerged": {
|
"shortread_qc_includeunmerged": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"fa_icon": "far fa-times-circle",
|
"fa_icon": "far fa-times-circle",
|
||||||
"description": "Discard unmerged reads from paired-end merging",
|
"description": "Include unmerged reads from paired-end merging in the downstream analysis",
|
||||||
"help_text": "Turns off the inclusion of unmerged reads in resulting processing FASTQ file of paired-end sequencing data when using `fastp`.\n\nThis can be useful in cases where you prefer to have very short reads (e.g. aDNA), thus excluding longer-reads or possibly faulty reads where one of the pair was discarded.\n\n> Modifies tool parameter(s):\n> - removed from reads `--include_unmerged`\n"
|
"help_text": "Turns on the inclusion of unmerged reads in resulting FASTQ file from merging paired-end sequencing data when using `fastp` and/or `AdapterRemoval`. For `fastp` this means the unmerged read pairs are directly included in the output FASTQ file. For `AdapterRemoval`, additional output files containing unmerged reads are all concatenated into one file by the workflow.\n\nExcluding unmerged reads can be useful in cases where you prefer to have very short reads (e.g. aDNA), thus excluding longer-reads or possibly faulty reads where one of the pair was discarded.\n\n> Adds `fastp` option: `--include_unmerged`\n"
|
||||||
},
|
},
|
||||||
"shortread_qc_minlength": {
|
"shortread_qc_minlength": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
|
|
@ -30,7 +30,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
|
||||||
* has to be exported in a separate channel and we must manually recombine when necessary.
|
* has to be exported in a separate channel and we must manually recombine when necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( params.shortread_qc_mergepairs && !params.shortread_qc_excludeunmerged ) {
|
if ( params.shortread_qc_mergepairs && params.shortread_qc_includeunmerged ) {
|
||||||
|
|
||||||
ch_concat_fastq = Channel.empty()
|
ch_concat_fastq = Channel.empty()
|
||||||
.mix(
|
.mix(
|
||||||
|
@ -40,9 +40,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
|
||||||
ADAPTERREMOVAL_PAIRED.out.paired_truncated
|
ADAPTERREMOVAL_PAIRED.out.paired_truncated
|
||||||
)
|
)
|
||||||
.map { meta, reads ->
|
.map { meta, reads ->
|
||||||
def meta_new = meta.clone()
|
[meta + [single_end: true], reads]
|
||||||
meta_new.single_end = true
|
|
||||||
[meta_new, reads]
|
|
||||||
}
|
}
|
||||||
.groupTuple()
|
.groupTuple()
|
||||||
// Paired-end reads cause a nested tuple during grouping.
|
// Paired-end reads cause a nested tuple during grouping.
|
||||||
|
@ -55,7 +53,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
|
||||||
ch_adapterremoval_reads_prepped = CAT_FASTQ.out.reads
|
ch_adapterremoval_reads_prepped = CAT_FASTQ.out.reads
|
||||||
.mix(ADAPTERREMOVAL_SINGLE.out.singles_truncated)
|
.mix(ADAPTERREMOVAL_SINGLE.out.singles_truncated)
|
||||||
|
|
||||||
} else if ( params.shortread_qc_mergepairs && params.shortread_qc_excludeunmerged ) {
|
} else if ( params.shortread_qc_mergepairs && !params.shortread_qc_includeunmerged ) {
|
||||||
|
|
||||||
ch_concat_fastq = Channel.empty()
|
ch_concat_fastq = Channel.empty()
|
||||||
.mix(
|
.mix(
|
||||||
|
@ -63,9 +61,7 @@ workflow SHORTREAD_ADAPTERREMOVAL {
|
||||||
ADAPTERREMOVAL_PAIRED.out.collapsed_truncated
|
ADAPTERREMOVAL_PAIRED.out.collapsed_truncated
|
||||||
)
|
)
|
||||||
.map { meta, reads ->
|
.map { meta, reads ->
|
||||||
def meta_new = meta.clone()
|
[meta + [single_end: true], reads]
|
||||||
meta_new.single_end = true
|
|
||||||
[meta_new, reads]
|
|
||||||
}
|
}
|
||||||
.groupTuple()
|
.groupTuple()
|
||||||
.map { meta, fastq -> [meta, fastq.flatten()] }
|
.map { meta, fastq -> [meta, fastq.flatten()] }
|
||||||
|
|
|
@ -28,7 +28,7 @@ if ( params.input ) {
|
||||||
if (params.databases) { ch_databases = file(params.databases) } else { exit 1, 'Input database sheet not specified!' }
|
if (params.databases) { ch_databases = file(params.databases) } else { exit 1, 'Input database sheet not specified!' }
|
||||||
|
|
||||||
if (params.shortread_qc_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler] MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files."
|
if (params.shortread_qc_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler] MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files."
|
||||||
if (params.shortread_qc_excludeunmerged && !params.shortread_qc_mergepairs) exit 1, "ERROR: [nf-core/taxprofiler] cannot include unmerged reads when merging not turned on. Please specify --shortread_qc_mergepairs"
|
if (params.shortread_qc_includeunmerged && !params.shortread_qc_mergepairs) exit 1, "ERROR: [nf-core/taxprofiler] cannot include unmerged reads when merging is not turned on. Please specify --shortread_qc_mergepairs"
|
||||||
|
|
||||||
if (params.shortread_complexityfilter_tool == 'fastp' && ( params.perform_shortread_qc == false || params.shortread_qc_tool != 'fastp' )) exit 1, "ERROR: [nf-core/taxprofiler] cannot use fastp complexity filtering if preprocessing not turned on and/or tool is not fastp. Please specify --perform_shortread_qc and/or --shortread_qc_tool 'fastp'"
|
if (params.shortread_complexityfilter_tool == 'fastp' && ( params.perform_shortread_qc == false || params.shortread_qc_tool != 'fastp' )) exit 1, "ERROR: [nf-core/taxprofiler] cannot use fastp complexity filtering if preprocessing not turned on and/or tool is not fastp. Please specify --perform_shortread_qc and/or --shortread_qc_tool 'fastp'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue