althonos / althonos/lightmotif
Invalid background frequencies
- Linguagem predominante
- Rust
- Estrelas
- 64
- Forks
- 2
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Hi,
I'm trying to create PSSMs for proteins with background frequencies.
I make extra sure that my background distribution sums up to 1.0 with:
```python
background_freq = {
"A": 0.0825,
"R": 0.0553,
"N": 0.0406,
"D": 0.0545,
"C": 0.0137,
"Q": 0.0393,
"E": 0.0675,
"G": 0.0707,
"H": 0.0227,
"I": 0.0596,
"L": 0.0966,
"K": 0.0584,
"M": 0.0242,
"F": 0.0386,
"P": 0.0470,
"S": 0.0656,
"T": 0.0534,
"W": 0.0108,
"Y": 0.0292,
"V": 0.0687,
"X": 0.0
}
s = sum(background_freq.values())
background_freq = {aa: f / s for aa, f in background_freq.items()}
background_freq["A"] += 1. - sum(background_freq.values())
assert sum(background_freq.values()) == 1.0
```
Still, when I try to get a PSSM with this I get a `ValueError` every time:
```
>>> pssm = pcm.normalize(pseudocount=0.25).log_odds(background=background_freq)
ValueError: Invalid background frequencies
```
I've traversed the documentation and looked for usage examples in the unit tests, but I couldn't find anything to help me understand how to correctly pass the background distribution.
Many thanks for the help.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.