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

matplotlib histogram of nearest neighbor energies #255

Open
dave-doty opened this issue Apr 4, 2024 · 0 comments
Open

matplotlib histogram of nearest neighbor energies #255

dave-doty opened this issue Apr 4, 2024 · 0 comments
Assignees
Labels
closed in dev enhancement New feature or request

Comments

@dave-doty
Copy link
Member

dave-doty commented Apr 4, 2024

I often run code like this in a Jupyter notebook to get a sense of the distribution of nearest neighbor energies of DNA strands of a certain length, to get a calibrated sense of good values to pick for low and high energy values to pass to NearestNeighborEnergyFilter:

import nuad.np as nn
import matplotlib.pyplot as plt

temperature = 37
length = 7
seqs = nn.DNASeqList(length=length)
energies = seqs.energies(temperature=temperature)
# help(plt.hist)
print(f'number of sequences of length {length}: {len(seqs):,}')
plt.figure(figsize=(15,6))
_=plt.hist(energies, bins=30)

number of sequences of length 7: 16,384
image

Add a helper function to the np submodule to automate this.

@dave-doty dave-doty self-assigned this Apr 4, 2024
@dave-doty dave-doty changed the title matplotlib historgrams of nearest neighbor energies matplotlib histogram of nearest neighbor energies Apr 4, 2024
dave-doty added a commit that referenced this issue Apr 4, 2024
…lib-histogram-of-nearest-neighbor-energies

closes #255 matplotlib histogram of nearest neighbor energies
@dave-doty dave-doty added enhancement New feature or request closed in dev labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed in dev enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant