Closed tleonardi closed 5 years ago
Ok, after looking into the issue it looks like the problem is caused by the lowCoverage check of TxComp.
Essentially, it's possible that for a transcript just above --min_coverage
, only a few positions pass this threshold. If the number of passing positions is less than context*3+3 we get the Not enough p-values for a context of order 2
error.
Additionally, I've noticed that there's another error:
# Collect pvalue lists per tests
pval_list_dict = defaultdict(list)
for pos_dict in ref_pos_list:
if 'txComp' in pos_dict:
for test in tests:
if test in pos_dict['txComp']:
pval_list_dict[test].append(pos_dict['txComp'][test])
This block completely ignores the lowCov positions, so if we have something like:
0.01
lowCov
0.01
lowCov
pval_list_dict becomes: [0.01, 0.01]
, leading to a wrong cross correlation.
The solution is to set the p-values of the lowCov positions to 1 when filling the pval_list_dict list.
Sounds like a reasonable approach for the lowCov.
Describe the bug This error is raised also when using
--min_ref_length 60
. Related to #63.Traceback