Repository navigation
Added per-sample denoised coverage output to gCNV - #5584
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5584 +/- ##
===============================================
+ Coverage 87.035% 87.048% +0.014%
+ Complexity 31535 31527 -8
===============================================
Files 1930 1928 -2
Lines 145443 145340 -103
Branches 16090 16089 -1
===============================================
- Hits 126586 126516 -70
+ Misses 12997 12963 -34
- Partials 5860 5861 +1
|
samuelklee
left a comment
There was a problem hiding this comment.
A couple of minor things, and a couple that might require a bit more consideration. Otherwise, looks good!
| from . import io_consts | ||
| from .._version import __version__ as gcnvkernel_version | ||
| from ..models.fancy_model import GeneralizedContinuousModel | ||
| from ..models.model_denoising_calling import DenoisingModel |
There was a problem hiding this comment.
Is this import required?
There was a problem hiding this comment.
No. Strangely, PyCharm does not let me know that..
| # column name for baseline copy-number file | ||
| baseline_copy_number_column_name = "BASELINE_COPY_NUMBER" | ||
|
|
||
| # column name for denoised copy-number files |
There was a problem hiding this comment.
We refer to the analogous quantities (i.e., counts which have been denoised by DenoiseReadCounts) as "denoised copy ratios" in the somatic pipeline. Any chance we could change throughout? Otherwise, it's slightly confusing to refer to non-integer quantities as "counts".
So these column headers would be DENOISED_COPY_RATIO_*, the files below would be denoised_copy_ratios_*.tsv, etc. Be sure to change variable names and comments as well.
There was a problem hiding this comment.
Don't forget to change the comment above.
| Returns: | ||
| A new and normalized probability vector if it deviates from unity more than `prob_sum_tol` | ||
| Otherwise, `prov_vector` is return unchanged. | ||
| Otherwise, `prob_vector` is return unchanged. |
| enable_explicit_gc_bias_modeling: bool = False, | ||
| disable_bias_factors_in_active_class: bool = False): | ||
| disable_bias_factors_in_active_class: bool = False, | ||
| denoised_counts_sampling_rounds: int = 250): |
There was a problem hiding this comment.
If this parameter is going to be part of the config, should it be exposed (up through the python script, Java CLI, and WDL)? It also feels a bit different from the other DenoisingModelConfig model parameters, in that it parameterizes the inference. However, it doesn't really qualify as a HybridInferenceParameter, either.
Does output of the denoised coverage significantly affect runtime or memory? If so, we should probably expose, and we can keep it here in the config. If not, I'd be fine with setting an unexposed default, but I'd put it somewhere else besides the config.
2aa4d93 to
e8459e1
Compare
| self.denoising_model_approx) | ||
|
|
||
| # compute approximate denoised copy number ratios | ||
| denoising_copy_ratios_approx_generator = commons.get_sampling_generator_for_model_approximation( |
There was a problem hiding this comment.
denoising -> denoised? if not, disregard.
| approx_var_set, approx_mu_map, approx_std_map = io_commons.extract_meanfield_posterior_parameters( | ||
| self.denoising_model_approx) | ||
|
|
||
| # compute approximate denoised copy number ratios |
There was a problem hiding this comment.
copy number ratios -> copy ratios
|
Oops, one more thing. Let's add these outputs to the relevant WDLs. EDIT: Scratch that, I guess they're included in the tar. |
e8459e1 to
2aec7ee
Compare
This PR adds two new files into the gCNV output directory - mean and the standard deviation of the denoised coverage, that is computed by drawing posterior samples from the computed model.