Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ppm handling and added figure saving #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabian178
Copy link

@fabian178 fabian178 commented Feb 29, 2024

Description

I added figure saving in the plotting functions and fixed a pseudocount error in the ppm_to_pwm conversion function. The problem occurs when a ppm with a 0 entry is converted to a pwm, there is no check for 0 entries, and the resulting pwm has a -inf entry, due to log2(0). This is fixed by adding a small pseudo count to the ppm and then normalising it such that all rows add to 1. This slightly changes the ppm, so imo, it is best to put this pseudo count check into the function that reads in the ppm.

Fixes #.

Checklist:

  • [x ] I have performed a self-review of my own code.
  • [x ] I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant