Skip to content
Snippets Groups Projects
Commit 24ada22d authored by Simon H. Tausch's avatar Simon H. Tausch
Browse files

add pseudocount to weighted score to prevent missing single reads

parent f7f29769
No related branches found
No related tags found
No related merge requests found
......@@ -349,7 +349,7 @@ def print_treedata(readcountdict, uniquebasesdict, backgrounddict, bsl_dict, res
weighted_score = uniquebasesdict[key] / len(
backgrounddict[key]) * math.log(speciesnum) # ratio of number of unique fore- and background bases
else:
weighted_score = uniquebasesdict[key] * math.log(speciesnum)
weighted_score = uniquebasesdict[key] * (math.log(speciesnum)+1) # add pseudocount to circumvent 0-scores for one read
try:
basesnum = uniquebasesdict[key]
except KeyError: # references without unique foreground bases are missing in uniquebasesdict
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment