Skip to content

Commit 68472c8

Browse files
committed
AFDB download example
1 parent 3cb55f4 commit 68472c8

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ macromolecular structures, in particular proteins.
2121
format files can be read in to a hierarchical data structure. Spatial
2222
calculations and functions to access the PDB are also provided.
2323
It compares favourably in terms of performance to other PDB parsers -
24-
see some [benchmarks online](https://github.com/jgreener64/pdb-benchmarks).
24+
see some [benchmarks online](https://github.com/jgreener64/pdb-benchmarks) - and
25+
should be lightweight enough to build other packages on top of.
2526

2627
## Installation
2728

docs/src/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Package extensions are used in order to reduce the number of dependencies:
1010
- To use `DataFrame`, call `using DataFrames`.
1111
- To use `MetaGraph`, call `using Graphs, MetaGraphs`.
1212
- To use [`MMTFDict`](@ref) or [`writemmtf`](@ref), call `import MMTF`.
13-
- To use [`rundssp!`](@ref), [`rundssp`](@ref) or the `run_dssp` option for `read`/[`retrievepdb`](@ref), call `using DSSP_jll`.
14-
- To use [`runstride!`](@ref), [`runstride`](@ref) or the `run_stride` option for `read`/[`retrievepdb`](@ref), call `using STRIDE_jll`.
13+
- To use [`rundssp!`](@ref), [`rundssp`](@ref) or the `run_dssp` option with `read`/[`retrievepdb`](@ref), call `using DSSP_jll`.
14+
- To use [`runstride!`](@ref), [`runstride`](@ref) or the `run_stride` option with `read`/[`retrievepdb`](@ref), call `using STRIDE_jll`.
1515

1616
Exported names:
1717
```@index

docs/src/documentation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ rundssp!(struc)
556556
runstride!(struc)
557557
```
558558
The assignment process may fail if the structure is too large, since we use an intermediate PDB file where the atom serial cannot exceed 99999 and the chain ID must be a single character.
559-
560559
To get access to the secondary structure code of a residue or atom as a `Char`:
561560
```julia
562561
sscode(res)
@@ -567,7 +566,6 @@ Or for the whole structure:
567566
sscode.(collectresidues(struc))
568567
```
569568
The secondary structure code of a residue can be changed using [`sscode!`](@ref).
570-
571569
[`rundssp`](@ref) and [`runstride`](@ref) can also be run directly on structure files:
572570
```julia
573571
rundssp("/path/to/pdb/file.pdb", "out.dssp") # Also works with mmCIF files
@@ -4073,7 +4071,7 @@ The relationship between different types in BioStructures is shown below:
40734071
The design is based on Biopython, and has the intention of representing the complexity of the data in the PDB without it getting in the way of users.
40744072
This hierarchical approach differs from some packages that represent structures as lists of either atoms or residues.
40754073
Note that it is possible to store non-biopolymer molecules in this representation, and there are many such examples in the PDB.
4076-
In general chemical terms: `MolecularStructure` is analogous to ensemble, `Model` to conformation, `Chain` to molecule and `Residue` to monomeric unit when relevant.
4074+
In general chemical terms: [`MolecularStructure`](@ref) is analogous to ensemble, [`Model`](@ref) to conformation, [`Chain`](@ref) to molecule and [`Residue`](@ref) to monomeric unit when relevant.
40774075

40784076
The aim of BioStructures is not so much to read in the rows of a structure file, but to unambiguously represent the molecules contained within the file.
40794077
This makes operations such as converting between file formats easier, at the cost of some complexity and occasional limits on the ability to read in files with format violations.

docs/src/examples.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,13 @@ mean(df.tempfactor) # Column-wise operations
131131
sort(df, :x) # Sorting
132132
CSV.write("1ALW.csv", df) # CSV file writing
133133
```
134+
135+
**J)** Download a model from the [AlphaFold database](https://alphafold.ebi.ac.uk) and show the secondary structure assignment of each residue.
136+
137+
```julia
138+
using DSSP_jll
139+
fp = download("https://alphafold.ebi.ac.uk/files/AF-P24941-F1-model_v4.pdb")
140+
struc = read(fp, PDBFormat; run_dssp=true)
141+
sscodes = sscode.(collectresidues(struc))
142+
println(join(sscodes))
143+
```

0 commit comments

Comments
 (0)