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

Plotting a protein from PDB fails with error: key "ALY" not found. #554

Open
DoktorMike opened this issue Aug 9, 2023 · 2 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@DoktorMike
Copy link

Very cool package. 💪🏼

I stumbled upon an unexpected behavior.

The following plot fails with error message: 'ERROR: KeyError: key "ALY" not found' which is one of the ligands in there.

using BioMakie
using GLMakie
using BioStructures

struc = retrievepdb("8cv4") |> Observable
fig = Figure()
plotstruc!(fig, struc; plottype = :ballandstick)

Environment:
Julia v1.9.2
Arch linux

Stacktrace below:

ERROR: KeyError: key "ALY" not found
Stacktrace:
  [1] getindex(h::Dict{String, Vector{Vector{String}}}, key::String)
    @ Base ./dict.jl:484
  [2] getbonds(::ProteinStructure; algo::Symbol, H::Bool, cutoff::Float64, extradistance::Float64, disulfides::Bool)
    @ BioMakie ~/.julia/packages/BioMakie/iPAEt/src/bonds.jl:719
  [3] getbonds
    @ ~/.julia/packages/BioMakie/iPAEt/src/bonds.jl:681 [inlined]
  [4] #290
    @ ./none:0 [inlined]
  [5] #map#13
    @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:564 [inlined]
  [6] map
    @ ~/.julia/packages/Observables/PHGQ8/src/Observables.jl:562 [inlined]
  [7] plottingdata(struc::Observable{ProteinStructure}; colors::Dict{String, Symbol}, radiustype::Symbol, water::Bool)
    @ BioMakie ~/.julia/packages/BioMakie/iPAEt/src/structure.jl:399
  [8] plottingdata
    @ ~/.julia/packages/BioMakie/iPAEt/src/structure.jl:382 [inlined]
  [9] plotstruc!(fig::Figure, struc::Observable{ProteinStructure}; resolution::Tuple{Int64, Int64}, gridposition::Tuple{Int64, Int64}, plottype::Symbol, atomcolors::Dict{String, Symbol}, markersize::Float64, markerscale::Float64, bondtype::Symbol, distance::Float64, inspectorlabel::Symbol, water::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ BioMakie ~/.julia/packages/BioMakie/iPAEt/src/structure.jl:565
 [10] plotstruc!(fig::Figure, struc::Observable{ProteinStructure})
    @ BioMakie ~/.julia/packages/BioMakie/iPAEt/src/structure.jl:551
 [11] top-level scope
    @ REPL[69]:1
@kool7d
Copy link
Member

kool7d commented Aug 11, 2023

Hi! Thanks for opening an issue. I'll look into this. It appears to be a problem with the bond algorithm using a dictionary that doesn't include a lot of modified residues like acetyllysine. Maybe I can add some more of those.

@DoktorMike
Copy link
Author

I found the place in the code but I have no idea what to write there. :)

@kool7d kool7d added enhancement New feature or request help wanted Extra attention is needed labels Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants