Skip to content

Commit

Permalink
Added some comments RE #80
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Wilm committed Jan 17, 2020
1 parent ca0bab0 commit a4db88e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/lofreq/lofreq_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ call_snvs(const plp_col_t *p, varcall_conf_t *conf)
long double pvalue = pvalues[i];
int reported_snv_ref = p->ref_base;

if (alt_base==reported_snv_ref) {
if (alt_base==reported_snv_ref) {
/* self comparison */
#if DEBUG
LOG_DEBUG("%s\n", "continue because self comparison")
Expand All @@ -830,8 +830,13 @@ call_snvs(const plp_col_t *p, varcall_conf_t *conf)
if (pvalue * (double)conf->bonf_subst < conf->sig) {
const int is_indel = 0;
const int is_consvar = 0;
float af = alt_raw_count/(float)p->coverage_plp;

float af = alt_raw_count/(float)p->coverage_plp;
/* can we make sure base filtering doesn't affect AF?
* See eg https://github.com/CSB5/lofreq/issues/80
* float af = alt_raw_count/(float)p->num_bases;
* doesn't help either
*/
assert(p->num_bases >= alt_raw_count);
char report_ref[2];
char report_alt[2];
report_ref[0] = reported_snv_ref;
Expand Down
5 changes: 4 additions & 1 deletion src/lofreq/snpcaller.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ plp_to_errprobs(double **err_probs, int *num_err_probs,
if (p->base_quals[i].n) {
bq = p->base_quals[i].data[j];

/* bq filtering for all */
/* bq filtering for all
* FIXME min_bq was meant to just influence quality calculations, not af etc
* but the filtering leaks out later, because alt_counts is computed and returned after filtering
*/
if (bq < conf->min_bq) {
continue;
}
Expand Down

0 comments on commit a4db88e

Please sign in to comment.