Skip to content

Commit

Permalink
fix calc E from definition 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kchu25 committed Dec 15, 2021
1 parent 28b6009 commit a0fc9ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://almob.biomedcentral.com/articles/10.1186/1748-7188-2-15

# Compute pvalue with pwm and score = 4
score2pvalue(pwm, 4)
> 0.00021457672119140625
> 0.000213623046875

# Compute the score-threshold for p-value 1e-4
pvalue2score(pwm, 1e-4)
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The maximum error induced by the rounded pwm M_ϵ
A positve real number that's the maximum error induced by the rounded pwm M_ϵ
=#
function calc_E(pwm, pwm_rounded)
sum(maximum(pwm[:,i]-pwm_rounded[:,i]) for i = size(pwm,2));
sum(maximum(pwm[:,i]-pwm_rounded[:,i]) for i = 1:size(pwm,2));
end

#=
Expand Down

0 comments on commit a0fc9ee

Please sign in to comment.