Repository navigation
Pair tumor and normal BAMs regardless of per-BAM kinetics #219
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ include { reportGenePanelTokens } from '../subworkflows/local/utils_nfcore_lrso | |
| include { reportGenePanelIsFile } from '../subworkflows/local/utils_nfcore_lrsomatic_pipeline' | ||
| include { resolveVepPlugins; validateVepPluginParams } from '../subworkflows/local/utils_nfcore_lrsomatic_pipeline' | ||
| include { padfootGenome; padfootAnnotationOk } from '../subworkflows/local/utils_nfcore_lrsomatic_pipeline' | ||
| include { validateClairstoCnaResources } from '../subworkflows/local/utils_nfcore_lrsomatic_pipeline' | ||
| include { validateClairstoCnaResources; validateSampleModels } from '../subworkflows/local/utils_nfcore_lrsomatic_pipeline' | ||
| include { PREPARE_VEP_PLUGINS } from '../subworkflows/local/prepare_vep_plugins' | ||
|
|
||
| // | ||
|
|
@@ -291,6 +291,12 @@ workflow LRSOMATIC { | |
| // clair3_model, clairS_model, clairSTO_model, kinetics | ||
| // bams are grouped per sample (multiple runs merged into a list) | ||
|
|
||
| // Fail fast if a sample's BAMs resolve to different caller models; they key the pairing joins | ||
| ch_samplesheet | ||
| .map { meta, _bam -> meta } | ||
| .collect() | ||
| .map { metas -> validateSampleModels(metas) } | ||
|
|
||
| // | ||
| // SUBWORKFLOW: PREPARE_REFERENCE_FILES -- decompress and index the FASTA, fetch Clair3 models, unpack ASCAT references | ||
| // Input: params.fasta, ASCAT file paths, basecall_meta, clair3_modelMap | ||
|
|
@@ -438,7 +444,6 @@ workflow LRSOMATIC { | |
| 'clair3_model', | ||
| 'clairS_model', | ||
| 'clairSTO_model', | ||
| 'kinetics', | ||
| 'n_replicates') | ||
| // groupKey: release each sample as soon as its own replicates arrive, not when all samples have | ||
| return [groupKey(new_meta, new_meta.n_replicates), bam, bai] | ||
|
|
@@ -522,8 +527,7 @@ workflow LRSOMATIC { | |
| 'fiber', | ||
| 'clair3_model', | ||
| 'clairS_model', | ||
| 'clairSTO_model', | ||
| 'kinetics') | ||
| 'clairSTO_model') | ||
| return[new_meta, bam, bai] | ||
| } | ||
| .set{paired_normal_bams} | ||
|
|
@@ -539,11 +543,11 @@ workflow LRSOMATIC { | |
| 'fiber', | ||
| 'clair3_model', | ||
| 'clairS_model', | ||
| 'clairSTO_model', | ||
| 'kinetics') | ||
| 'clairSTO_model') | ||
| return[new_meta, bam, bai] | ||
| } | ||
| .join(paired_normal_bams) | ||
| // failOnMismatch: a tumor/normal meta drift must stop the run, not drop the pair | ||
| .join(paired_normal_bams, failOnMismatch: true) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No regression test for the bug this PR fixes. The only new tests are the two Nothing tagged Suggestions:
|
||
| .set { somatic_smallvar_input } | ||
| // somatic_smallvar_input: [meta, tumor_bam, tumor_bai, normal_bam, normal_bai] | ||
|
|
||
|
|
@@ -570,8 +574,7 @@ workflow LRSOMATIC { | |
| 'fiber', | ||
| 'clair3_model', | ||
| 'clairS_model', | ||
| 'clairSTO_model', | ||
| 'kinetics') | ||
| 'clairSTO_model') | ||
| def normal_bam = [] | ||
| def normal_bai = [] | ||
| return [new_meta, normal_bam, normal_bai, bam, bai] | ||
|
|
@@ -877,8 +880,7 @@ workflow LRSOMATIC { | |
| 'fiber', | ||
| 'clair3_model', | ||
| 'clairS_model', | ||
| 'clairSTO_model', | ||
| 'kinetics') | ||
| 'clairSTO_model') | ||
| return[new_meta, bam, bai] | ||
| } | ||
| .map{meta, tumor_bam, tumor_bai-> | ||
|
|
@@ -1050,7 +1052,7 @@ workflow LRSOMATIC { | |
| // so build its input from PHASING_HAPLOTYPING's haplotagged BAMs rather than the | ||
| // unphased ones severus_input carries. | ||
| def savana_meta_keys = ['id', 'paired_data', 'platform', 'sex', 'fiber', | ||
| 'clair3_model', 'clairS_model', 'clairSTO_model', 'kinetics'] | ||
| 'clair3_model', 'clairS_model', 'clairSTO_model'] | ||
|
|
||
| PHASING_HAPLOTYPING.out.tumor_normal_hapbams_ch | ||
| .branch { meta, _bam, _bai -> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing
CHANGELOG.mdentry. The PR changes behaviour that users will see:failOnMismatch.REVIEW.md asks for an entry under
v1.2.0devthat cites #219. This should probably go underFixed, and possiblyChangedfor the new launch-time error.