Skip to content

Commit

Permalink
Update to Backboner 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonOresten committed Jul 19, 2024
1 parent 05fa1ee commit 8d53728
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AssigningSecondaryStructure"
uuid = "8ed43e74-60fb-4e11-99b9-91deed37aef7"
authors = ["Anton Oresten <[email protected]>"]
version = "0.4.1"
version = "0.4.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -13,7 +13,7 @@ Backboner = "9ac9c2a2-1cfe-46d3-b3fd-6fa470ea56a7"
BackbonerExt = "Backboner"

[compat]
Backboner = "0.9, 0.10"
Backboner = "0.11"
LinearAlgebra = "1"
julia = "1"

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ The package is registered in the General registry, and can be installed from the

## Usage

The `assign_secondary_structure` function takes a vector of atom coordinate arrays of size (3, 3, L). The first axis is for the x, y, and z coordinates, the second axis is for the atom types (N, CA, C), and the third axis is for the residues.

In cases where the coordinates aren't already loaded, one can import Backboner, which adds support for .pdb and .cif files.

```julia
julia> using AssigningSecondaryStructure
julia> using AssigningSecondaryStructure, Backboner

julia> using Backboner # package with an extension that adds support for PDB files
julia> using Backboner

julia> assign_secondary_structure("test/data/1ASS.pdb") # 1 chain
1-element Vector{Vector{Int64}}:
Expand All @@ -30,8 +34,6 @@ julia> assign_secondary_structure("test/data/1ZAK.pdb") # 2 chains
[1, 1, 1, 1, 3, 3, 3, 3, 3, 3 2, 2, 2, 2, 2, 2, 2, 1, 1, 1]
```

Without Backboner, `assign_secondary_structure` takes a vector of atom coordinate arrays of size (3, 3, L), in cases where the atom coordinates are already loaded. The first axis is for the x, y, and z coordinates, the second axis is for the atom types (N, CA, C), and the third axis is for the residues.

## Acknowledgements

This package was originally ported from the [PyDSSP](https://github.com/ShintaroMinami/PyDSSP) package, created by Shintaro Minami. The code has since been rewritten to look more like the 1983 paper (Kabsch W and Sander C), and to be more Julian, understandable, and efficient, at the cost of it no longer being differentiable like the PyDSSP version. The time complexity is still quadratic, so it may be slow for larger proteins. We plan on making a more efficient version with k-d trees.
3 changes: 2 additions & 1 deletion ext/BackbonerExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ get_coords(chain::Backboner.Protein.Chain) = reshape(chain.backbone.coords, 3, 3

AssigningSecondaryStructure.assign_secondary_structure(chains::Vector{Backboner.Protein.Chain}) = assign_secondary_structure(get_coords.(chains))
AssigningSecondaryStructure.assign_secondary_structure(chain::Backboner.Protein.Chain) = assign_secondary_structure([chain])[1]
AssigningSecondaryStructure.assign_secondary_structure(filename::AbstractString) = assign_secondary_structure(Backboner.Protein.readpdb(filename))
AssigningSecondaryStructure.assign_secondary_structure(path::AbstractString, format) = assign_secondary_structure(Backboner.Protein.readchains(path, format))
AssigningSecondaryStructure.assign_secondary_structure(path::AbstractString) = assign_secondary_structure(Backboner.Protein.readchains(path))

end

2 comments on commit 8d53728

@AntonOresten
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • Update to Backboner v0.11

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/111370

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.4.2 -m "<description of version>" 8d537289ac3d1277e52c3cb658a84ac7393074da
git push origin v0.4.2

Please sign in to comment.