Skip to content

Commit

Permalink
removed trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikseidel committed Nov 1, 2024
1 parent 8c44563 commit 7590325
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions workflows/detaxizer.nf
Original file line number Diff line number Diff line change
Expand Up @@ -377,20 +377,20 @@ workflow NFCORE_DETAXIZER {
( !params.validation_blastn && params.enable_filter ) || params.filter_with_classification
) && !params.filter_trimmed
) {

ch_classification = RENAME_FASTQ_HEADERS_PRE.out.fastq
.join(MERGE_IDS.out.classified_ids, by:[0])

FILTER(
ch_classification
)

ch_versions = ch_versions.mix(FILTER.out.versions.first())

} else if (
params.enable_filter && !params.filter_trimmed
) {

ch_blastn2filter = FILTER_BLASTN_IDENTCOV.out.classified_ids.map {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
Expand All @@ -408,31 +408,31 @@ workflow NFCORE_DETAXIZER {
ch_blastnfilter = ch_combined_short_long_id.join(
ch_blastn2filter, by:[0]
)

FILTER(
ch_blastnfilter
)

ch_versions = ch_versions.mix(FILTER.out.versions.first())

} else if (
(
( !params.validation_blastn && params.enable_filter ) || params.filter_with_classification
) && params.filter_trimmed
){

ch_classification = ch_fastq_for_classification
.join(MERGE_IDS.out.classified_ids, by:[0])

FILTER(
ch_classification
)

ch_versions = ch_versions.mix(FILTER.out.versions.first())
} else if (
params.enable_filter && params.filter_trimmed
){

ch_blastn2filter = FILTER_BLASTN_IDENTCOV.out.classified_ids.map {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
Expand All @@ -446,23 +446,23 @@ workflow NFCORE_DETAXIZER {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
}

ch_blastnfilter = ch_combined_short_long_id.join(
ch_blastn2filter, by:[0]
)

FILTER(
ch_blastnfilter
)

ch_versions = ch_versions.mix(FILTER.out.versions.first())
}

//
// MODULE: Rename headers after filtering
//
if ( params.enable_filter ) {

ch_headers = RENAME_FASTQ_HEADERS_PRE.out.headers.map {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
Expand All @@ -472,41 +472,41 @@ workflow NFCORE_DETAXIZER {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
}

ch_removed2rename = Channel.empty()

if ( params.output_removed_reads ){
ch_removed2rename = FILTER.out.removed.map {
meta, path ->
return [ meta + [ id: meta.id.replaceAll("(_R1|_R2)", "") ], path ]
}
}

ch_rename_filtered = ch_filtered2rename.join(ch_headers, by:[0])

ch_removed2rename = ch_removed2rename.ifEmpty(['empty', []])

if ( params.output_removed_reads ){

RENAME_FASTQ_HEADERS_AFTER(
ch_rename_filtered,
ch_removed2rename
)

ch_versions = ch_versions.mix(RENAME_FASTQ_HEADERS_AFTER.out.versions.first())

} else {

RENAME_FASTQ_HEADERS_AFTER(
ch_rename_filtered,
ch_removed2rename.first()

)

ch_versions = ch_versions.mix(RENAME_FASTQ_HEADERS_AFTER.out.versions.first())

}

if ( params.classification_kraken2_post_filtering ) {

KRAKEN2_POST_CLASSIFICATION_FILTERED (
Expand All @@ -515,18 +515,18 @@ workflow NFCORE_DETAXIZER {
params.save_output_fastqs_filtered,
true
)

ch_versions = ch_versions.mix(KRAKEN2_POST_CLASSIFICATION_FILTERED.out.versions.first())

if (params.output_removed_reads) {

KRAKEN2_POST_CLASSIFICATION_REMOVED (
RENAME_FASTQ_HEADERS_AFTER.out.fastq_removed,
KRAKEN2PREPARATION.out.db.first(),
params.save_output_fastqs_removed,
true
)

ch_versions = ch_versions.mix(KRAKEN2_POST_CLASSIFICATION_REMOVED.out.versions.first())

}
Expand All @@ -538,13 +538,13 @@ workflow NFCORE_DETAXIZER {
// MODULE: Summarize the classification process
//
if (params.validation_blastn){

ch_summary = ch_classification_summary.mix(ch_blastn_summary).collect().map {
item -> [['id': "summary_of_classification_and_blastn"], item]
}

} else {

ch_summary = ch_classification_summary.collect().map {
item -> [['id': "summary_of_classification"], item]
}
Expand Down

0 comments on commit 7590325

Please sign in to comment.