Update saltshaker reports#856
Conversation
|
fellen31
left a comment
There was a problem hiding this comment.
Nice work! And I think good to have all the HTML generation in one process.
Since you are writing code that groups together one or more samples into one process, I would really like to encourage you to add a test beforehand (preferably in a separate PR) to CALL_SV_MT with multiple samples so you can be confident that your changes work not only with one sample. If not a test with real data, then at least a stub test.
|
|
||
| input: | ||
| tuple val(meta), path(classify) | ||
| tuple val(meta), path(files_in), val(ids) |
There was a problem hiding this comment.
Perhaps?
| tuple val(meta), path(files_in), val(ids) | |
| tuple val(meta), path(saltshaker_classify_reports), val(sample_ids) |
| $args \ | ||
| --input ${files_in.join(' --input ')} \ | ||
| --sample ${ids.join(' --sample ')} \ | ||
| --output ${prefix}.saltshaker_classify.html |
There was a problem hiding this comment.
Would always strive for rather than less flexibility on naming within the module. You could change the prefix to be ${meta.id}.saltshaker_classify in the config if you want.
| --output ${prefix}.saltshaker_classify.html | |
| --output ${prefix}.html |
|
|
||
| output: | ||
| tuple val(meta), path("*.html"), emit: classify_html | ||
| tuple val(meta), path("*.saltshaker_classify.html"), emit: classify_html |
There was a problem hiding this comment.
See https://github.com/nf-core/raredisease/pull/856/changes#r3304124293
| tuple val(meta), path("*.saltshaker_classify.html"), emit: classify_html | |
| tuple val(meta), path("*.html"), emit: classify_html |
| ch_ploidy_model // channel: [optional; used by mandatory for GATK's cnvcaller][ path(ploidy_model) ] | ||
| ch_readcount_intervals // channel: [optional; used by mandatory for GATK's cnvcaller][ path(intervals) ] | ||
| ch_reads // channel: [mandatory] [ val(meta), [path(reads)] ] | ||
| ch_sample_id_map // channel: [optional] [val(id), val(id)] |
There was a problem hiding this comment.
What ids are expected in ch_sample_id_map? sample ids? case ids? customer ids?
| input[19] = 'chrM' | ||
| input[20] = 15 | ||
| input[21] = 0.01 | ||
| input[10] = channel.empty() |
There was a problem hiding this comment.
Don't you need to test ch_sample_id_map with real inputs? One test where you have customer ids and one where you don't have them would be good I think.
| .branch { sample_meta, caseid, txt, samplemap -> | ||
| id: samplemap.equals(null) | ||
| return [['id':caseid], txt, sample_meta.id] | ||
| custid: !(samplemap.equals(null)) | ||
| return [['id':caseid], txt, samplemap] | ||
| } | ||
| .set { ch_for_mix } | ||
|
|
||
| FIND_CONCATENATE( | ||
| ch_saltshaker_txts | ||
| ) | ||
| ch_saltshaker_txt = FIND_CONCATENATE.out.file_out | ||
| channel.empty() | ||
| .mix(ch_for_mix.id, ch_for_mix.custid) | ||
| .groupTuple() |
There was a problem hiding this comment.
What is samplemap here? Is it customer_ids?
| .branch { sample_meta, caseid, txt, samplemap -> | |
| id: samplemap.equals(null) | |
| return [['id':caseid], txt, sample_meta.id] | |
| custid: !(samplemap.equals(null)) | |
| return [['id':caseid], txt, samplemap] | |
| } | |
| .set { ch_for_mix } | |
| FIND_CONCATENATE( | |
| ch_saltshaker_txts | |
| ) | |
| ch_saltshaker_txt = FIND_CONCATENATE.out.file_out | |
| channel.empty() | |
| .mix(ch_for_mix.id, ch_for_mix.custid) | |
| .groupTuple() | |
| .map { sample_meta, case_id, txt, customer_id -> | |
| def report_identifier = customer_id ?: sample_meta.id | |
| return [['id': case_id], txt, report_identifier] | |
| } | |
| .groupTuple() |
| .map { meta, paths, ids -> | ||
| def sorted_paths = paths.sort { a, b -> a.getName() <=> b.getName() } | ||
| def sorted_ids = ids.sort() | ||
| return [meta, sorted_paths, sorted_ids] | ||
| } |
There was a problem hiding this comment.
Do you really need to do this? Will they not be sorted automatically with groupTuple?
| def sorted_ids = ids.sort() | ||
| return [meta, sorted_paths, sorted_ids] | ||
| } | ||
| .dump('tag': 'saltshaker_html_input') |
There was a problem hiding this comment.
| .dump('tag': 'saltshaker_html_input') |
…nto saltshaker_reports
PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile test_singleton,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).