ProteinChains
Documentation for ProteinChains.
ProteinChains.STANDARD_RESIDUE_TEMPLATE
ProteinChains.BackboneGeometry
ProteinChains.IdealResidue
ProteinChains.IndexableProperty
ProteinChains.PersistentProperty
ProteinChains.ProteinChain
ProteinChains.ProteinStructure
ProteinChains.ProteinStructureStore
ProteinChains.ProteinStructureStore
ProteinChains.ProteinStructureStore
ProteinChains.addproperties
ProteinChains.addproperties
ProteinChains.append_residue
ProteinChains.deserialize
ProteinChains.mapmmcif
ProteinChains.pdbentry
ProteinChains.prepend_residue
ProteinChains.removeproperties
ProteinChains.renumber
ProteinChains.serialize
ProteinChains.STANDARD_RESIDUE_TEMPLATE
— ConstantSTANDARD_RESIDUE_TEMPLATE
This is a template of a "standard residue", with a very specific and distinct shape, size, and orientation. which needs to be consistent if we want to represent protein structures as sets of residue rotations and translations.
Thus, we can use this residue as a template for aligning other residues with very precise geometry to it.
julia> IdealResidue{Float64}(BackboneGeometry(N_Ca_C_angle = 1.93); template=ProteinChains.STANDARD_RESIDUE_TEMPLATE)
+Home · ProteinChains.jl ProteinChains
Documentation for ProteinChains.
ProteinChains.STANDARD_RESIDUE_TEMPLATE
ProteinChains.BackboneGeometry
ProteinChains.IdealResidue
ProteinChains.IndexableProperty
ProteinChains.PersistentProperty
ProteinChains.ProteinChain
ProteinChains.ProteinStructure
ProteinChains.ProteinStructureStore
ProteinChains.ProteinStructureStore
ProteinChains.ProteinStructureStore
ProteinChains.addproperties
ProteinChains.addproperties
ProteinChains.append_residue
ProteinChains.deserialize
ProteinChains.mapmmcif
ProteinChains.pdbentry
ProteinChains.prepend_residue
ProteinChains.removeproperties
ProteinChains.renumber
ProteinChains.serialize
ProteinChains.STANDARD_RESIDUE_TEMPLATE
— ConstantSTANDARD_RESIDUE_TEMPLATE
This is a template of a "standard residue", with a very specific and distinct shape, size, and orientation. which needs to be consistent if we want to represent protein structures as sets of residue rotations and translations.
Thus, we can use this residue as a template for aligning other residues with very precise geometry to it.
julia> IdealResidue{Float64}(BackboneGeometry(N_Ca_C_angle = 1.93); template=ProteinChains.STANDARD_RESIDUE_TEMPLATE)
3×3 IdealResidue{Float64}:
-1.06447 -0.199174 1.26364
0.646303 -0.529648 -0.116655
- 0.0 0.0 0.0
sourceProteinChains.BackboneGeometry
— TypeBackboneGeometry(;
+ 0.0 0.0 0.0
sourceProteinChains.BackboneGeometry
— TypeBackboneGeometry(;
N_Ca_length = 1.46,
Ca_C_length = 1.52,
C_N_length = 1.33,
@@ -11,9 +11,9 @@
N_Ca_C_angle = 1.94,
Ca_C_N_angle = 2.03,
C_N_Ca_angle = 2.13,
-)
Define the idealized bond lengths and bond angles of a protein backbone.
sourceProteinChains.IdealResidue
— TypeIdealResidue{T<:AbstractFloat} <: AbstractMatrix{T}
+)
Define the idealized bond lengths and bond angles of a protein backbone.
sourceProteinChains.IdealResidue
— TypeIdealResidue{T<:AbstractFloat} <: AbstractMatrix{T}
-IdealResidue{T}(backbone_geometry=DEFAULT_BACKBONE_GEOMETRY; template=nothing) where T
A 3x3 matrix representing the idealized geometry of a protein residue, with columns representing the N, Ca, and C atom positions of a residue positioned at the origin.
sourceProteinChains.IndexableProperty
— TypeIndexableProperty <: AbstractProperty
+IdealResidue{T}(backbone_geometry=DEFAULT_BACKBONE_GEOMETRY; template=nothing) where T
A 3x3 matrix representing the idealized geometry of a protein residue, with columns representing the N, Ca, and C atom positions of a residue positioned at the origin.
sourceProteinChains.IndexableProperty
— TypeIndexableProperty <: AbstractProperty
IndexableProperty(value::AbstractArray)
An AbstractArray
property with size (dims..., length(chain))
, and residue indexing of the chain being propagated to the last dimension of the array.
julia> chain = pdb"1ASS"A;
@@ -23,10 +23,10 @@
false
julia> chain.y[:,1:10] == chain[1:10].y
-true
sourceProteinChains.PersistentProperty
— TypePersistentProperty(value)
A property of arbitrary type that persists after residue indexing of a chain.
julia> chain = addproperties(pdb"1ASS"A; x=PersistentProperty(1));
+true
sourceProteinChains.PersistentProperty
— TypePersistentProperty(value)
A property of arbitrary type that persists after residue indexing of a chain.
julia> chain = addproperties(pdb"1ASS"A; x=PersistentProperty(1));
julia> chain.x == chain[1:10].x
-true
sourceProteinChains.ProteinChain
— TypeProteinChain{T<:Real,Ps<:NamedProperties}
Represents a protein chain with a basic set of fields from which some other properties might be derived. The addproperties
function can be used to instantiate new chains with additional properties.
Fields
id::String
: Identifier for the protein chain.atoms::Vector{Vector{Atom{T}}}
: List of atoms in each residue.sequence::String
: Amino acid sequence of the protein.numbering::Vector{Int32}
: Residue numbering (author). See renumber
for renumbering.properties::Ps
: Named properties associated with the chain.
See also addproperties
, PersistentProperty
, IndexableProperty
. ```
sourceProteinChains.ProteinStructure
— TypeProteinStructure{T} <: AbstractVector{ProteinChain{T}}
Fields
name::String
: Usually just the base name of the original file.atoms::Vector{Atom{T}}
: free atoms from the structure that were not part of any protein chain.chains::Vector{<:ProteinChain{T}}
: a collection of ProteinChain
s.
Examples
julia> structure = pdb"1ASS"
sourceProteinChains.ProteinStructureStore
— TypeProteinStructureStore <: AbstractDict{String,ProteinStructure}
A mutable struct representing a store for protein structures using HDF5 file format.
The struct implements the AbstractDict interface, allowing for dictionary-like operations.
A ProteinStructureStore
gets closed when there no longer exists a program-accessible reference to it.
Examples
julia> store = ProteinStructureStore("store.h5")
+true
sourceProteinChains.ProteinChain
— TypeProteinChain{T<:Real,Ps<:NamedProperties}
Represents a protein chain with a basic set of fields from which some other properties might be derived. The addproperties
function can be used to instantiate new chains with additional properties.
Fields
id::String
: Identifier for the protein chain.atoms::Vector{Vector{Atom{T}}}
: List of atoms in each residue.sequence::String
: Amino acid sequence of the protein.numbering::Vector{Int32}
: Residue numbering (author). See renumber
for renumbering.properties::Ps
: Named properties associated with the chain.
See also addproperties
, PersistentProperty
, IndexableProperty
. ```
sourceProteinChains.ProteinStructure
— TypeProteinStructure{T} <: AbstractVector{ProteinChain{T}}
Fields
name::String
: Usually just the base name of the original file.atoms::Vector{Atom{T}}
: free atoms from the structure that were not part of any protein chain.chains::Vector{<:ProteinChain{T}}
: a collection of ProteinChain
s.
Examples
julia> structure = pdb"1ASS"
sourceProteinChains.ProteinStructureStore
— TypeProteinStructureStore <: AbstractDict{String,ProteinStructure}
A mutable struct representing a store for protein structures using HDF5 file format.
The struct implements the AbstractDict interface, allowing for dictionary-like operations.
A ProteinStructureStore
gets closed when there no longer exists a program-accessible reference to it.
Examples
julia> store = ProteinStructureStore("store.h5")
ProteinStructureStore with 0 entries
julia> store["3HFM"] = pdb"3HFM"
@@ -44,8 +44,8 @@
"3HFM"
julia> delete!(store, "3HFM")
-ProteinStructureStore with 0 entries
sourceProteinChains.ProteinStructureStore
— TypeProteinStructureStore(filename, mode="cw")
Open or create an HDF5 file as a ProteinStructureStore
where mode
is one of:
- "r" read only
- "r+" read and write
- "cw" read and write, create file if not existing, do not truncate
- "w" read and write, create a new file (destroys any existing contents)
sourceProteinChains.ProteinStructureStore
— MethodProteinStructureStore(f::Function, filename, mode="cw")
sourceProteinChains.addproperties
— Methodaddproperties(chain::ProteinChain, names::Symbol...)
-addproperties(chain::ProteinStructure, names::Symbol...)
Add predefined properties to a chain or chains of a structure.
sourceProteinChains.addproperties
— Methodaddproperties(chain::ProteinChain; properties...)
Creates a new ProteinChain
instance with the added properties. Indexing behavior of property values can be specified by wrapping them with PersistentProperty
or IndexableProperty
.
Values get wrapped by PersistentProperty
by default.
See also removeproperties
, PersistentProperty
, IndexableProperty
sourceProteinChains.append_residue
— Methodappend_residue(Backbone::Backbone, torsion_angles::Vector{<:Real}; ideal::BackboneGeometry=DEFAULT_BACKBONE_GEOMETRY)
Create a new backbone by appending 3 new torsion angles (ψ, ω, ϕ) at the end, using bond lengths and bond angles specified in BackboneGeometry
.
sourceProteinChains.deserialize
— Methoddeserialize(filename::AbstractString)
Deserialize ProteinStructure
objects from an HDF5 file. Returns a Vector{ProteinStructure}
of all structures stored in the file.
sourceProteinChains.mapmmcif
— Methodmapmmcif(mmcifdict, field1 => field2, field3 => field4, ...)
julia> import BioStructures
+ProteinStructureStore with 0 entries
sourceProteinChains.ProteinStructureStore
— TypeProteinStructureStore(filename, mode="cw")
Open or create an HDF5 file as a ProteinStructureStore
where mode
is one of:
- "r" read only
- "r+" read and write
- "cw" read and write, create file if not existing, do not truncate
- "w" read and write, create a new file (destroys any existing contents)
sourceProteinChains.ProteinStructureStore
— MethodProteinStructureStore(f::Function, filename, mode="cw")
sourceProteinChains.addproperties
— Methodaddproperties(chain::ProteinChain, names::Symbol...)
+addproperties(chain::ProteinStructure, names::Symbol...)
Add predefined properties to a chain or chains of a structure.
sourceProteinChains.addproperties
— Methodaddproperties(chain::ProteinChain; properties...)
Creates a new ProteinChain
instance with the added properties. Indexing behavior of property values can be specified by wrapping them with PersistentProperty
or IndexableProperty
.
Values get wrapped by PersistentProperty
by default.
See also removeproperties
, PersistentProperty
, IndexableProperty
sourceProteinChains.append_residue
— Methodappend_residue(Backbone::Backbone, torsion_angles::Vector{<:Real}; ideal::BackboneGeometry=DEFAULT_BACKBONE_GEOMETRY)
Create a new backbone by appending 3 new torsion angles (ψ, ω, ϕ) at the end, using bond lengths and bond angles specified in BackboneGeometry
.
sourceProteinChains.deserialize
— Methoddeserialize(filename::AbstractString)
Deserialize ProteinStructure
objects from an HDF5 file. Returns a Vector{ProteinStructure}
of all structures stored in the file.
sourceProteinChains.mapmmcif
— Methodmapmmcif(mmcifdict, field1 => field2, field3 => field4, ...)
julia> import BioStructures
julia> filename = BioStructures.downloadpdb("3HFM", format=BioStructures.MMCIFFormat);
[ Info: Downloading file from PDB: 3HFM
@@ -58,7 +58,7 @@
Dict{String, String} with 3 entries:
"Y" => "9031"
"L" => "10090"
- "H" => "10090"
sourceProteinChains.pdbentry
— Methodpdbentry(pdbid::AbstractString; format=MMCIFFormat, kwargs...)
Keyword arguments get propagated to BioStructures.downloadpdb
Downloads are cached in a temporary directory.
Examples
julia> pdbentry("1EYE")
+ "H" => "10090"
sourceProteinChains.pdbentry
— Methodpdbentry(pdbid::AbstractString; format=MMCIFFormat, kwargs...)
Keyword arguments get propagated to BioStructures.downloadpdb
Downloads are cached in a temporary directory.
Examples
julia> pdbentry("1EYE")
[ Info: Downloading file from PDB: 1EYE
1-chain ProteinStructure{Float64} "1EYE.cif"
256-residue ProteinChain{Float64, @NamedTuple{}} (A)
@@ -76,4 +76,4 @@
[ Info: Downloading file from PDB: 1EYE
2-chain ProteinStructure{Float64} "1EYE_ba1.cif"
256-residue ProteinChain{Float64, @NamedTuple{}} (A)
- 256-residue ProteinChain{Float64, @NamedTuple{}} (A-2)
sourceProteinChains.prepend_residue
— Methodappend_residue(Backbone::Backbone, torsion_angles::Vector{<:Real}; ideal::BackboneGeometry=DEFAULT_BACKBONE_GEOMETRY)
Create a new backbone by prepending 3 new torsion angles (ψ, ω, ϕ) at the beginning, using bond lengths and bond angles specified in the BackboneGeometry
.
Note The torsion angle order is the same as it would be when appending. The order is not reversed.
sourceProteinChains.removeproperties
— Methodremoveproperties(chain::ProteinChain, names::Symbol...)
Creates a new ProteinChain
instance with the property names in names
removed.
See also addproperties
sourceProteinChains.renumber
— Methodrenumber(structure::ProteinStructure, mmcif_dict::BioStructures.MMCIFDict)
Return residue numbers from "atomsite.labelseqids".
The ProteinStructure
will automatically add a renumbering
property if an MMCIFDict is passed (default if the file is an MMCIF).
sourceProteinChains.serialize
— Methodserialize(filename::AbstractString, structures::AbstractVector{<:ProteinStructure})
Serialize a vector of ProteinStructure
objects to an HDF5 file. This function creates a new ProteinStructureStore
and writes each structure in the input vector to it. Each structure is stored using its name as the key.
sourceSettings
This document was generated with Documenter.jl version 1.7.0 on Wednesday 23 October 2024. Using Julia version 1.11.1.
+ 256-residue ProteinChain{Float64, @NamedTuple{}} (A-2)
ProteinChains.prepend_residue
— Methodappend_residue(Backbone::Backbone, torsion_angles::Vector{<:Real}; ideal::BackboneGeometry=DEFAULT_BACKBONE_GEOMETRY)
Create a new backbone by prepending 3 new torsion angles (ψ, ω, ϕ) at the beginning, using bond lengths and bond angles specified in the BackboneGeometry
.
The torsion angle order is the same as it would be when appending. The order is not reversed.
ProteinChains.removeproperties
— Methodremoveproperties(chain::ProteinChain, names::Symbol...)
Creates a new ProteinChain
instance with the property names in names
removed.
See also addproperties
ProteinChains.renumber
— Methodrenumber(structure::ProteinStructure, mmcif_dict::BioStructures.MMCIFDict)
Return residue numbers from "atomsite.labelseqids".
The ProteinStructure
will automatically add a renumbering
property if an MMCIFDict is passed (default if the file is an MMCIF).
ProteinChains.serialize
— Methodserialize(filename::AbstractString, structures::AbstractVector{<:ProteinStructure})
Serialize a vector of ProteinStructure
objects to an HDF5 file. This function creates a new ProteinStructureStore
and writes each structure in the input vector to it. Each structure is stored using its name as the key.