Skip to content

Commit 5752df8

Browse files
committed
mention extensions in docstrings
1 parent 8d4d112 commit 5752df8

4 files changed

Lines changed: 20 additions & 15 deletions

File tree

docs/src/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CurrentModule = BioStructures
66

77
Package extensions are used in order to reduce the number of dependencies:
88
- To use `LongAA`, call `using BioSequences`.
9-
- To use `pairalign` or [`Transformation`](@ref) on structural elements, call `using BioSequences, BioAlignments`.
9+
- To use `pairalign`, [`superimpose!`](@ref), [`rmsd`](@ref)/[`displacements`](@ref) with the `superimpose` option or [`Transformation`](@ref) on structural elements, call `using BioSequences, BioAlignments`.
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 as MMTFPkg` (to avoid clashing with [`BioStructures.MMTF`](@ref)).

docs/src/documentation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ To carry out superimposition, BioStructures.jl carries out a sequence alignment
483483
For example:
484484

485485
```julia
486+
using BioSequences, BioAlignments
487+
486488
# Change the coordinates of element 1 to superimpose it onto element 2
487489
# Do sequence alignment with standard residues and calculate the transformation with Cα atoms (the default)
488490
superimpose!(el1, el2, standardselector)

src/model.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ A `StructuralElement` or `Vector` of `StructuralElement`s up to
222222
a `Vector{Model}`.
223223
"""
224224
const StructuralElementOrList = Union{
225-
StructuralElement,
226-
Vector{Model},
227-
Vector{Chain},
228-
Vector{<:AbstractResidue},
229-
Vector{<:AbstractAtom},
230-
}
225+
StructuralElement,
226+
Vector{Model},
227+
Vector{Chain},
228+
Vector{<:AbstractResidue},
229+
Vector{<:AbstractAtom},
230+
}
231231

232232
# Allow accessing sub elements contained in an element like a dictionary
233233
# e.g. allows you to do res[atom_name] rather than res.atoms[atom_name]
@@ -1792,49 +1792,49 @@ Base.show(io::IO, struc::MolecularStructure) = print(io,
17921792
"with $(countmodels(struc)) models, ",
17931793
countchains(struc) != 0 ? "$(countchains(struc)) chains ($(join(chainids(struc), ","))), " : "0 chains, ",
17941794
"$(countresidues(struc, standardselector)) residues, ",
1795-
"$(countatoms(struc)) atoms"
1795+
"$(countatoms(struc)) atoms",
17961796
)
17971797

17981798
Base.show(io::IO, mo::Model) = print(io,
17991799
"Model $(modelnumber(mo)) with ",
18001800
countchains(mo) != 0 ? "$(countchains(mo)) chains ($(join(chainids(mo), ","))), " : "0 chains, ",
18011801
"$(countresidues(mo, standardselector)) residues, ",
1802-
"$(countatoms(mo)) atoms"
1802+
"$(countatoms(mo)) atoms",
18031803
)
18041804

18051805
Base.show(io::IO, ch::Chain) = print(io,
18061806
"Chain $(chainid(ch)) with ",
18071807
"$(countresidues(ch, standardselector)) residues, ",
18081808
"$(countresidues(ch, heteroselector)) other molecules, ",
1809-
"$(countatoms(ch)) atoms"
1809+
"$(countatoms(ch)) atoms",
18101810
)
18111811

18121812
Base.show(io::IO, res::Residue) = print(io,
18131813
"Residue $(resid(res, full=true)) with ",
18141814
"name $(resname(res)), ",
1815-
"$(countatoms(res)) atoms"
1815+
"$(countatoms(res)) atoms",
18161816
)
18171817

18181818
Base.show(io::IO, dis_res::DisorderedResidue) = print(io,
18191819
"DisorderedResidue $(resid(dis_res, full=true)) with ",
1820-
"names $(join(resnames(dis_res), ","))"
1820+
"names $(join(resnames(dis_res), ","))",
18211821
)
18221822

18231823
Base.show(io::IO, at::Atom) = print(io,
18241824
"Atom $(atomname(at)) with ",
18251825
"serial $(serial(at)), ",
18261826
"coordinates $(coords(at))",
1827-
altlocid(at) != ' ' ? ", alt loc ID $(altlocid(at))" : ""
1827+
altlocid(at) != ' ' ? ", alt loc ID $(altlocid(at))" : "",
18281828
)
18291829

18301830
Base.show(io::IO, dis_at::DisorderedAtom) = print(io,
18311831
"DisorderedAtom $(atomname(dis_at)) with ",
1832-
"alt loc IDs $(join(altlocids(dis_at), ","))"
1832+
"alt loc IDs $(join(altlocids(dis_at), ","))",
18331833
)
18341834

18351835
Base.show(io::IO, at_rec::AtomRecord) = print(io,
18361836
"AtomRecord $(strip(at_rec.atom_name)) with ",
18371837
"serial $(at_rec.serial), ",
18381838
"coordinates $(at_rec.coords)",
1839-
at_rec.alt_loc_id != ' ' ? ", alt loc ID $(at_rec.alt_loc_id)" : ""
1839+
at_rec.alt_loc_id != ' ' ? ", alt loc ID $(at_rec.alt_loc_id)" : "",
18401840
)

src/spatial.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ end
123123
Calculate the `Transformation` that maps the first element onto the second,
124124
and modify all coordinates in the first element according to the transformation.
125125
126+
Requires the BioSequences.jl and BioAlignments.jl packages to be imported.
126127
See `Transformation` for keyword arguments.
127128
"""
128129
function superimpose!(el1::StructuralElementOrList,
@@ -166,6 +167,7 @@ Get the root-mean-square deviation (RMSD) in Å between two
166167
167168
If `superimpose` is `true` (the default), the elements are superimposed before
168169
RMSD calculation and the RMSD is calculated on the superimposed residues.
170+
In this case the BioSequences.jl and BioAlignments.jl packages should be imported.
169171
See `Transformation` for keyword arguments.
170172
If `superimpose` is `false` the elements are assumed to be superimposed and must
171173
be of the same length.
@@ -209,6 +211,7 @@ Get the displacements in Å between atomic coordinates from two
209211
210212
If `superimpose` is `true` (the default), the elements are superimposed before
211213
calculation and the displacements are calculated on the superimposed residues.
214+
In this case the BioSequences.jl and BioAlignments.jl packages should be imported.
212215
See `Transformation` for keyword arguments.
213216
If `superimpose` is `false` the elements are assumed to be superimposed and must
214217
be of the same length.

0 commit comments

Comments
 (0)