Skip to content

Changing sum-to-1 error to a warning for calculating information content

Pre-release
Pre-release
Compare
Choose a tag to compare
@AvantiShri AvantiShri released this 22 Jan 23:05
· 129 commits to master since this release
1058bac

Corresponds to PR #80

This error typically occurs when the user has sequences that are not perfectly one-hot encoded - i.e. some columns are all-zeros (usually because the one-hot encoding procedure mapped Ns to all-zeros). This can result in a PPM where the probabilities don't sum to 1 in all the rows. The error is thrown when computing the information content for visualization purposes. The information content can still be calculated by simply renormalizing the rows to sum to 1, so that's what this workaround does (after printing a warning). The user should still make sure that they are ok with this behavior.