1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 04:19:54 +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"
- "--perform_runmerging"
- "--perform_runmerging --shortread_clipmerge_mergepairs"
- "--shortread_complexityfilter false --shortread_hostremoval"
- "--shortread_complexityfilter false --perform_shortread_hostremoval"
steps:
- name: Check out pipeline code

View file

@ -31,6 +31,6 @@ params {
perform_shortread_clipmerge = true
perform_longread_clip = false
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'
}

View file

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

View file

@ -359,7 +359,7 @@
"perform_runmerging": {
"type": "boolean"
},
"shortread_hostremoval": {
"perform_shortread_hostremoval": {
"type": "boolean"
},
"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_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.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.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_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 = [] }
/*
@ -140,15 +139,13 @@ workflow TAXPROFILER {
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_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions.first())
} else {
ch_shortreads_hostremoved = ch_shortreads_filtered
}
*/
if ( params.perform_runmerging ) {
ch_reads_for_cat_branch = ch_shortreads_hostremoved
@ -225,7 +222,7 @@ workflow TAXPROFILER {
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_versions = ch_versions.mix(SHORTREAD_HOSTREMOVAL.out.versions)
}