mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-25 03:39:54 +00:00
Merge branch 'filtlong-in-tests' into json-schema
This commit is contained in:
commit
d19a473c59
7 changed files with 21 additions and 56 deletions
|
@ -136,9 +136,9 @@ process {
|
||||||
|
|
||||||
withName: FILTLONG {
|
withName: FILTLONG {
|
||||||
ext.args = [
|
ext.args = [
|
||||||
"--min_length ${params.longread_qc_minlength}",
|
"--min_length ${params.longread_qc_qualityfilter_minlength}",
|
||||||
"--keep_percent ${params.longread_qc_keep_percent}",
|
"--keep_percent ${params.longread_qc_qualityfilter_keeppercent}",
|
||||||
"--target_bases ${params.longread_qc_target_bases}"
|
"--target_bases ${params.longread_qc_qualityfilter_targetbases}"
|
||||||
]
|
]
|
||||||
.join(' ').trim()
|
.join(' ').trim()
|
||||||
ext.prefix = { "${meta.id}_${meta.run_accession}_filtered" }
|
ext.prefix = { "${meta.id}_${meta.run_accession}_filtered" }
|
||||||
|
|
|
@ -26,6 +26,7 @@ params {
|
||||||
databases = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/database.csv'
|
databases = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/database.csv'
|
||||||
perform_shortread_qc = true
|
perform_shortread_qc = true
|
||||||
perform_longread_qc = true
|
perform_longread_qc = true
|
||||||
|
shortread_qc_mergepairs = true
|
||||||
perform_shortread_complexityfilter = true
|
perform_shortread_complexityfilter = true
|
||||||
perform_shortread_hostremoval = true
|
perform_shortread_hostremoval = true
|
||||||
perform_longread_hostremoval = true
|
perform_longread_hostremoval = true
|
||||||
|
|
|
@ -26,6 +26,7 @@ params {
|
||||||
databases = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/database.csv'
|
databases = 'https://raw.githubusercontent.com/nf-core/test-datasets/taxprofiler/database.csv'
|
||||||
perform_shortread_qc = true
|
perform_shortread_qc = true
|
||||||
perform_longread_qc = true
|
perform_longread_qc = true
|
||||||
|
shortread_qc_mergepairs = true
|
||||||
perform_shortread_complexityfilter = true
|
perform_shortread_complexityfilter = true
|
||||||
perform_shortread_hostremoval = true
|
perform_shortread_hostremoval = true
|
||||||
perform_longread_hostremoval = true
|
perform_longread_hostremoval = true
|
||||||
|
|
|
@ -58,18 +58,18 @@ params {
|
||||||
perform_shortread_qc = false
|
perform_shortread_qc = false
|
||||||
shortread_qc_tool = 'fastp'
|
shortread_qc_tool = 'fastp'
|
||||||
shortread_qc_skipadaptertrim = false
|
shortread_qc_skipadaptertrim = false
|
||||||
shortread_qc_mergepairs = false
|
shortread_qc_mergepairs = true
|
||||||
shortread_qc_excludeunmerged = false
|
shortread_qc_excludeunmerged = false
|
||||||
shortread_qc_adapter1 = null
|
shortread_qc_adapter1 = null
|
||||||
shortread_qc_adapter2 = null
|
shortread_qc_adapter2 = null
|
||||||
shortread_qc_minlength = 15
|
shortread_qc_minlength = 15
|
||||||
|
|
||||||
perform_longread_qc = false
|
perform_longread_qc = false
|
||||||
longread_qc_run_clip = false
|
longread_qc_skipadaptertrim = false
|
||||||
longread_qc_run_filter = false
|
longread_qc_skipqualityfilter = false
|
||||||
longread_qc_minlength = 1000
|
longread_qc_qualityfilter_minlength = 1000
|
||||||
longread_qc_keep_percent = 90
|
longread_qc_qualityfilter_keeppercent = 90
|
||||||
longread_qc_target_bases = 500000000
|
longread_qc_qualityfilter_targetbases = 500000000
|
||||||
|
|
||||||
save_preprocessed_reads = false
|
save_preprocessed_reads = false
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,7 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"fa_icon": "fas fa-terminal",
|
"fa_icon": "fas fa-terminal",
|
||||||
"description": "Define where the pipeline should find input data and save output data.",
|
"description": "Define where the pipeline should find input data and save output data.",
|
||||||
"required": [
|
"required": ["input", "databases", "outdir"],
|
||||||
"input",
|
|
||||||
"databases",
|
|
||||||
"outdir"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"input": {
|
"input": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -83,10 +79,7 @@
|
||||||
"shortread_qc_tool": {
|
"shortread_qc_tool": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "fastp",
|
"default": "fastp",
|
||||||
"enum": [
|
"enum": ["fastp", "adapterremoval"],
|
||||||
"fastp",
|
|
||||||
"adapterremoval"
|
|
||||||
],
|
|
||||||
"fa_icon": "fas fa-tools",
|
"fa_icon": "fas fa-tools",
|
||||||
"description": "Specify which tool to use for read QC"
|
"description": "Specify which tool to use for read QC"
|
||||||
},
|
},
|
||||||
|
@ -131,11 +124,7 @@
|
||||||
"shortread_complexityfilter_tool": {
|
"shortread_complexityfilter_tool": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "bbduk",
|
"default": "bbduk",
|
||||||
"enum": [
|
"enum": ["bbduk", "prinseqplusplus", "fastp"],
|
||||||
"bbduk",
|
|
||||||
"prinseqplusplus",
|
|
||||||
"fastp"
|
|
||||||
],
|
|
||||||
"fa_icon": "fas fa-hammer",
|
"fa_icon": "fas fa-hammer",
|
||||||
"description": "Specify which tool to use for complexity filtering"
|
"description": "Specify which tool to use for complexity filtering"
|
||||||
},
|
},
|
||||||
|
@ -165,10 +154,7 @@
|
||||||
"shortread_complexityfilter_prinseqplusplus_mode": {
|
"shortread_complexityfilter_prinseqplusplus_mode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "entropy",
|
"default": "entropy",
|
||||||
"enum": [
|
"enum": ["entropy", "dust"],
|
||||||
"entropy",
|
|
||||||
"dust"
|
|
||||||
],
|
|
||||||
"fa_icon": "fas fa-check-square",
|
"fa_icon": "fas fa-check-square",
|
||||||
"description": "Specify the complexity filter mode for PRINSEQ++"
|
"description": "Specify the complexity filter mode for PRINSEQ++"
|
||||||
},
|
},
|
||||||
|
@ -323,15 +309,7 @@
|
||||||
"diamond_output_format": {
|
"diamond_output_format": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "tsv",
|
"default": "tsv",
|
||||||
"enum": [
|
"enum": ["blast", "xml", "txt", "daa", "sam", "tsv", "paf"],
|
||||||
"blast",
|
|
||||||
"xml",
|
|
||||||
"txt",
|
|
||||||
"daa",
|
|
||||||
"sam",
|
|
||||||
"tsv",
|
|
||||||
"paf"
|
|
||||||
],
|
|
||||||
"fa_icon": "fas fa-file",
|
"fa_icon": "fas fa-file",
|
||||||
"description": "Specify output format from DIAMOND profiling."
|
"description": "Specify output format from DIAMOND profiling."
|
||||||
},
|
},
|
||||||
|
@ -348,14 +326,7 @@
|
||||||
"kaiju_taxon_rank": {
|
"kaiju_taxon_rank": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "species",
|
"default": "species",
|
||||||
"enum": [
|
"enum": ["phylum", "class", "order", "family", "genus", "species"],
|
||||||
"phylum",
|
|
||||||
"class",
|
|
||||||
"order",
|
|
||||||
"family",
|
|
||||||
"genus",
|
|
||||||
"species"
|
|
||||||
],
|
|
||||||
"fa_icon": "fas fa-tag",
|
"fa_icon": "fas fa-tag",
|
||||||
"description": "Specify taxonomic rank to be displayed in Kaiju taxon table"
|
"description": "Specify taxonomic rank to be displayed in Kaiju taxon table"
|
||||||
},
|
},
|
||||||
|
@ -540,14 +511,7 @@
|
||||||
"description": "Method used to save pipeline results to output directory.",
|
"description": "Method used to save pipeline results to output directory.",
|
||||||
"help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.",
|
"help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.",
|
||||||
"fa_icon": "fas fa-copy",
|
"fa_icon": "fas fa-copy",
|
||||||
"enum": [
|
"enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"],
|
||||||
"symlink",
|
|
||||||
"rellink",
|
|
||||||
"link",
|
|
||||||
"copy",
|
|
||||||
"copyNoFollow",
|
|
||||||
"move"
|
|
||||||
],
|
|
||||||
"hidden": true
|
"hidden": true
|
||||||
},
|
},
|
||||||
"email_on_fail": {
|
"email_on_fail": {
|
||||||
|
|
|
@ -14,7 +14,7 @@ workflow LONGREAD_PREPROCESSING {
|
||||||
ch_versions = Channel.empty()
|
ch_versions = Channel.empty()
|
||||||
ch_multiqc_files = Channel.empty()
|
ch_multiqc_files = Channel.empty()
|
||||||
|
|
||||||
if ( params.longread_qc_run_clip && !params.longread_qc_run_filter ) {
|
if ( !params.longread_qc_skipadaptertrim && params.longread_qc_skipqualityfilter) {
|
||||||
PORECHOP ( reads )
|
PORECHOP ( reads )
|
||||||
|
|
||||||
ch_processed_reads = PORECHOP.out.reads
|
ch_processed_reads = PORECHOP.out.reads
|
||||||
|
@ -28,7 +28,7 @@ workflow LONGREAD_PREPROCESSING {
|
||||||
ch_versions = ch_versions.mix(PORECHOP.out.versions.first())
|
ch_versions = ch_versions.mix(PORECHOP.out.versions.first())
|
||||||
ch_multiqc_files = ch_multiqc_files.mix( PORECHOP.out.log )
|
ch_multiqc_files = ch_multiqc_files.mix( PORECHOP.out.log )
|
||||||
|
|
||||||
} else if ( !params.longread_qc_run_clip && params.longread_qc_run_filter ) {
|
} else if ( params.longread_qc_skipadaptertrim && !params.longread_qc_skipqualityfilter) {
|
||||||
|
|
||||||
ch_processed_reads = FILTLONG ( reads.map{ meta, reads -> [meta, [], reads ]} )
|
ch_processed_reads = FILTLONG ( reads.map{ meta, reads -> [meta, [], reads ]} )
|
||||||
ch_versions = ch_versions.mix(FILTLONG.out.versions.first())
|
ch_versions = ch_versions.mix(FILTLONG.out.versions.first())
|
||||||
|
|
|
@ -22,7 +22,6 @@ if (params.databases) { ch_databases = file(params.databases) } else { exit 1, '
|
||||||
|
|
||||||
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_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.longread_qc_run_clip || params.longread_qc_run_filter) & !params.perform_longread_qc ) exit 1, "ERROR: [nf-core/taxprofiler] --longread_qc_run_clip or --longread_qc_run_filter requested but quality-control not turned on. Please specify --perform_long_qc"
|
|
||||||
|
|
||||||
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