Add mix and match functionality for mutation calling (resolves #265)#283
Add mix and match functionality for mutation calling (resolves #265)#283
Conversation
arkal
left a comment
There was a problem hiding this comment.
Looking good. Minor edits needed. Also, Make sure you add an entry in MANUAL.md.
| job.fileStore.logToMaster('Aggregated mutations for %s successfully' % univ_options['patient']) | ||
| return merged_snvs.rv() | ||
| chroms = {} | ||
| for caller in mutation_results: |
There was a problem hiding this comment.
Document why you've done this
| @@ -105,25 +121,27 @@ def merge_perchrom_mutations(job, chrom, mutations, univ_options): | |||
| # For now, let's just say 2 out of n need to call it. | |||
There was a problem hiding this comment.
remove these redundant comments
| if 'strelka' + mut_type in perchrom_mutations: | ||
| perchrom_mutations['strelka'] = perchrom_mutations['strelka_' + mut_type] | ||
| perchrom_mutations.pop('strelka_' + mut_type) | ||
| if not perchrom_mutations: |
There was a problem hiding this comment.
This condition should occur before # process the strelka key
| perchrom_mutations.pop('strelka_' + mut_type) | ||
| if not perchrom_mutations: | ||
| continue | ||
| majority = 1 if len(perchrom_mutations) <= 2 else len(perchrom_mutations) / 2 |
There was a problem hiding this comment.
(len(perchrom_mutations) + 1) / 2
src/protect/pipeline/ProTECT.py
Outdated
|
|
||
| # Flags to check for presence of encryption keys if required | ||
| gdc_inputs = ssec_encrypted = False | ||
| gdc_inputs = ssec_encrypted = sample_without_variants = False |
There was a problem hiding this comment.
# Flags to check for presence of encryption keys if required
gdc_inputs = ssec_encrypted = False
# Flag to check if a sample without an input vcf/bedpe was provided
sample_without_variants = False
src/protect/pipeline/ProTECT.py
Outdated
| raise ParameterError('Cannot run ProTECT using GDC RNA bams. Please fix ' | ||
| 'sample %s' % sample_name) | ||
| gdc_inputs = True | ||
| if 'mutation_vcf' not in sample_set[sample_name] and 'fusion_bedpe' not in sample_set[sample_name]: |
f1e1f69 to
466c800
Compare
| # Process the strelka key | ||
| perchrom_mutations['strelka'] = perchrom_mutations['strelka_' + mut_type] | ||
| perchrom_mutations.pop('strelka_' + mut_type) | ||
| if 'strelka' + mut_type in perchrom_mutations: |
There was a problem hiding this comment.
This should be if 'strelka_' + mut_type in perchrom_mutations:
466c800 to
f7266f6
Compare
MANUAL.md
Outdated
|
|
||
| mutation_calling: | ||
| consensus: | ||
| indel_majority: None -> Number of callers required to accept an indel. |
There was a problem hiding this comment.
remove the 'None'. Say default is to compute it dynamically. Same for snv
src/protect/pipeline/defaults.yaml
Outdated
|
|
||
| mutation_calling: | ||
| consensus: | ||
| indel_majority: None |
There was a problem hiding this comment.
make this
consensus:
indel_majority:
snv_majority:
| # version: 1.2.0 | ||
|
|
||
| mutation_calling: | ||
| consensus: |
There was a problem hiding this comment.
Make this
consensus:
# indel_majority: 1 # The number of callers required to accept an indel
# snv_majority: 2 # The number of callers required to accept an snv
src/protect/pipeline/ProTECT.py
Outdated
| else: | ||
| count = 1 if tool_options['strelka']['run'] is True else 0 | ||
| if tool_options['consensus'][mut_type + '_majority'] > count: | ||
| raise RuntimeError('Majority cannot be greater than the number of callers. Got number of %s callers ' |
f7266f6 to
85337d0
Compare
85337d0 to
b018a59
Compare
resolves #265
Added functionality so the user can select which mutation callers to execute. If no mutation callers are selected, the user must provide at least a mutation_vcf or a fusion_bedpe file.