1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 05:09:55 +00:00

Fix merge cockup

This commit is contained in:
James Fellows Yates 2022-04-13 14:19:19 +02:00
parent 70f94603b0
commit aa2d07c42a
5 changed files with 9 additions and 12 deletions

View file

@ -41,7 +41,7 @@ jobs:
- "--shortread_complexityfilter_tool prinseq" - "--shortread_complexityfilter_tool prinseq"
- "--perform_runmerging" - "--perform_runmerging"
- "--perform_runmerging --shortread_clipmerge_mergepairs" - "--perform_runmerging --shortread_clipmerge_mergepairs"
- "--shortread_complexityfilter false --shortread_hostremoval" - "--shortread_complexityfilter false --perform_shortread_hostremoval"
steps: steps:
- name: Check out pipeline code - name: Check out pipeline code

View file

@ -31,6 +31,6 @@ params {
perform_shortread_clipmerge = true perform_shortread_clipmerge = true
perform_longread_clip = false perform_longread_clip = false
perform_shortread_complexityfilter = true perform_shortread_complexityfilter = true
shortread_hostremoval = true perform_shortread_hostremoval = true
shortread_hostremoval_reference = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta' shortread_hostremoval_reference = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta'
} }

View file

@ -81,7 +81,7 @@ params {
save_runmerged_reads = false save_runmerged_reads = false
// Host Removal // Host Removal
shortread_hostremoval = false perform_shortread_hostremoval = false
shortread_hostremoval_reference = null shortread_hostremoval_reference = null
shortread_hostremoval_index = null shortread_hostremoval_index = null

View file

@ -359,7 +359,7 @@
"perform_runmerging": { "perform_runmerging": {
"type": "boolean" "type": "boolean"
}, },
"shortread_hostremoval": { "perform_shortread_hostremoval": {
"type": "boolean" "type": "boolean"
}, },
"shortread_hostremoval_reference": { "shortread_hostremoval_reference": {

View file

@ -22,11 +22,10 @@ if (params.databases) { ch_databases = file(params.databases) } else { exit 1, '
if (params.shortread_clipmerge_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler] warning: MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files." if (params.shortread_clipmerge_mergepairs && params.run_malt ) log.warn "[nf-core/taxprofiler] warning: MALT does not accept uncollapsed paired-reads. Pairs will be profiled as separate files."
if (params.shortread_clipmerge_excludeunmerged && !params.shortread_clipmerge_mergepairs) exit 1, "[nf-core/taxprofiler] error: cannot include unmerged reads when merging not turned on. Please specify --shortread_clipmerge_mergepairs" if (params.shortread_clipmerge_excludeunmerged && !params.shortread_clipmerge_mergepairs) exit 1, "[nf-core/taxprofiler] error: cannot include unmerged reads when merging not turned on. Please specify --shortread_clipmerge_mergepairs"
// TODO Add check if index but no reference exit 1 if (params.perform_shortread_hostremoval && !params.shortread_hostremoval_reference) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval requested but no --shortread_hostremoval_reference FASTA supplied. Check input." }
if (params.shortread_hostremoval && !params.shortread_hostremoval_reference) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval requested but no --shortread_hostremoval_reference FASTA supplied. Check input." }
if (!params.shortread_hostremoval_reference && params.shortread_hostremoval_reference_index) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval_index provided but no --shortread_hostremoval_reference FASTA supplied. Check input." } if (!params.shortread_hostremoval_reference && params.shortread_hostremoval_reference_index) { exit 1, "[nf-core/taxprofiler] error: --shortread_hostremoval_index provided but no --shortread_hostremoval_reference FASTA supplied. Check input." }
if (params.shortread_hostremoval_reference ) { ch_reference = file(params.shortread_hostremoval_reference) } else { ch_reference = [] } if (params.shortread_hostremoval_reference ) { ch_reference = file(params.shortread_hostremoval_reference) }
if (params.shortread_hostremoval_index ) { ch_reference_index = file(params.shortread_hostremoval_index ) } else { ch_reference_index = [] } if (params.shortread_hostremoval_index ) { ch_reference_index = file(params.shortread_hostremoval_index ) } else { ch_reference_index = [] }
/* /*
@ -140,15 +139,13 @@ workflow TAXPROFILER {
SUBWORKFLOW: HOST REMOVAL SUBWORKFLOW: HOST REMOVAL
*/ */
if ( params.shortread_hostremoval ) { if ( params.perform_shortread_hostremoval ) {
ch_shortreads_hostremoved = SHORTREAD_HOSTREMOVAL ( ch_shortreads_filtered, ch_reference, ch_reference_index ).reads ch_shortreads_hostremoved = SHORTREAD_HOSTREMOVAL ( ch_shortreads_filtered, ch_reference, ch_reference_index ).reads
ch_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions.first()) ch_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions.first())
} else { } else {
ch_shortreads_hostremoved = ch_shortreads_filtered ch_shortreads_hostremoved = ch_shortreads_filtered
} }
*/
if ( params.perform_runmerging ) { if ( params.perform_runmerging ) {
ch_reads_for_cat_branch = ch_shortreads_hostremoved ch_reads_for_cat_branch = ch_shortreads_hostremoved
@ -225,11 +222,11 @@ workflow TAXPROFILER {
ch_versions = ch_versions.mix( SHORTREAD_COMPLEXITYFILTERING.out.versions ) ch_versions = ch_versions.mix( SHORTREAD_COMPLEXITYFILTERING.out.versions )
} }
if (params.shortread_hostremoval) { if (params.perform_shortread_hostremoval) {
ch_multiqc_files = ch_multiqc_files.mix(SHORTREAD_HOSTREMOVAL.out.mqc.collect{it[1]}.ifEmpty([])) ch_multiqc_files = ch_multiqc_files.mix(SHORTREAD_HOSTREMOVAL.out.mqc.collect{it[1]}.ifEmpty([]))
ch_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions) ch_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions)
} }
if (params.perform_runmerging){ if (params.perform_runmerging){
ch_versions = ch_versions.mix(CAT_FASTQ.out.versions) ch_versions = ch_versions.mix(CAT_FASTQ.out.versions)
} }