diff --git a/Project.toml b/Project.toml index 37ad1a5..8ee60f7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Backboner" uuid = "9ac9c2a2-1cfe-46d3-b3fd-6fa470ea56a7" authors = ["Anton Oresten "] -version = "0.11.3" +version = "0.11.4" [deps] BioStructures = "de9282ab-8554-53be-b2d6-f6c222edabfc" diff --git a/src/protein/BioStructures-interface.jl b/src/protein/BioStructures-interface.jl index 8e6119b..1ef3cc9 100644 --- a/src/protein/BioStructures-interface.jl +++ b/src/protein/BioStructures-interface.jl @@ -59,14 +59,17 @@ end function Protein.Chain(chain::BioStructures.Chain, selector=backbone_residue_selector) residues = BioStructures.collectresidues(chain, selector) - isempty(residues) && return Protein.Chain(BioStructures.chainid(chain), Backbone(Matrix{Float64}(undef, 3, 0)); modelnum=BioStructures.modelnumber(chain)) + isempty(residues) && return Protein.Chain(Backbone(Matrix{Float64}(undef, 3, 0)); id=BioStructures.chainid(chain), modelnum=BioStructures.modelnumber(chain)) return Protein.Chain(residues) end function collectchains(struc::BioStructures.MolecularStructure, selector=backbone_residue_selector) chains = Protein.Chain[] for model in struc, chain in model - isempty(chain) || push!(chains, Protein.Chain(chain, selector)) + if !isempty(chain) + protein_chain = Protein.Chain(chain, selector) + !isempty(protein_chain) && push!(chains, protein_chain) + end end return chains end