Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename merging summary #69

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Summary processes don't modify the input file anymore, allowing resuming these processes ([#66](https://github.com/nf-core/crisprseq/pull/66))
- Do not stash unexistent files, use empty lists instead. Fixes AWS tests ([#67](https://github.com/nf-core/crisprseq/pull/67))
- Rename process `merging_summary` to `preprocessing_summary` to improve clarity ([#69](https://github.com/nf-core/crisprseq/pull/69))

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ process {
ext.prefix = { "${fasta.baseName}_top" }
}

withName: MERGING_SUMMARY {
withName: PREPROCESSING_SUMMARY {
publishDir = [
path: { "${params.outdir}/summary/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process MERGING_SUMMARY {
process PREPROCESSING_SUMMARY {
tag "$meta.id"
label 'process_single'

Expand All @@ -12,11 +12,11 @@ process MERGING_SUMMARY {


output:
tuple val(meta), path("*_merging_summary.csv"), emit: summary
tuple val(meta), path("*_preprocessing_summary.csv"), emit: summary

when:
task.ext.when == null || task.ext.when

script:
template 'merging_summary.py'
template 'preprocessing_summary.py'
}
2 changes: 1 addition & 1 deletion templates/clustering_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
summary_lines = summary.readlines()

add_line = True
outname = "$summary".replace("_merging_summary.csv", "_clustering_summary.csv")
outname = "$summary".replace("_preprocessing_summary.csv", "_clustering_summary.csv")
with open(outname, "w") as output_file:
for line in summary_lines:
if "clustered-reads" not in line:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
else:
prefix = "$meta.id"

with open(f"{prefix}_merging_summary.csv", "w") as output_file:
with open(f"{prefix}_preprocessing_summary.csv", "w") as output_file:
output_file.write("class, count\\n")
output_file.write(f"raw-reads, {raw_reads_count} (100.0%)\\n")
output_file.write(
Expand Down
26 changes: 13 additions & 13 deletions workflows/crisprseq_targeted.nf
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ ch_multiqc_custom_methods_description = params.multiqc_methods_description ? fil
//
// MODULE
//
include { FIND_ADAPTERS } from '../modules/local/find_adapters'
include { EXTRACT_UMIS } from '../modules/local/extract_umis'
include { ORIENT_REFERENCE } from '../modules/local/orient_reference'
include { CIGAR_PARSER } from '../modules/local/cigar_parser'
include { MERGING_SUMMARY } from '../modules/local/merging_summary'
include { CLUSTERING_SUMMARY } from '../modules/local/clustering_summary'
include { ALIGNMENT_SUMMARY } from '../modules/local/alignment_summary'
include { TEMPLATE_REFERENCE } from '../modules/local/template_reference'
include { FIND_ADAPTERS } from '../modules/local/find_adapters'
include { EXTRACT_UMIS } from '../modules/local/extract_umis'
include { ORIENT_REFERENCE } from '../modules/local/orient_reference'
include { CIGAR_PARSER } from '../modules/local/cigar_parser'
include { PREPROCESSING_SUMMARY } from '../modules/local/preprocessing_summary'
include { CLUSTERING_SUMMARY } from '../modules/local/clustering_summary'
include { ALIGNMENT_SUMMARY } from '../modules/local/alignment_summary'
include { TEMPLATE_REFERENCE } from '../modules/local/template_reference'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -347,7 +347,7 @@ workflow CRISPRSEQ_TARGETED {
}
return [ meta, reads, assembled, masked, trimmed ]
}
.set { ch_merging_summary_data }
.set { ch_preprocessing_summary_data }
} else {
ch_cat_fastq.paired
.mix(ch_cat_fastq.single)
Expand All @@ -359,14 +359,14 @@ workflow CRISPRSEQ_TARGETED {
}
return [ meta, reads, assembled, masked, [] ]
}
.set { ch_merging_summary_data }
.set { ch_preprocessing_summary_data }
}

//
// MODULE: Summary of merged reads
//
MERGING_SUMMARY {
ch_merging_summary_data
PREPROCESSING_SUMMARY {
ch_preprocessing_summary_data
}


Expand Down Expand Up @@ -587,7 +587,7 @@ workflow CRISPRSEQ_TARGETED {
//
CLUSTERING_SUMMARY (
ch_preprocess_reads
.join(MERGING_SUMMARY.out.summary)
.join(PREPROCESSING_SUMMARY.out.summary)
)


Expand Down
Loading