Skip to content

Commit a41094c

Browse files
authored
Merge pull request #519 from padix-key/doc
Update documentation
2 parents 7b26ba6 + 9b2da7f commit a41094c

File tree

14 files changed

+158
-131
lines changed

14 files changed

+158
-131
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ htmlcov
2323
# Ignore autogenerated example gallery
2424
/doc/examples/gallery
2525
/doc/examples/backreferences
26+
/doc/sg_execution_times.rst
2627

2728
# Ignore autogenerated tutorial
2829
/doc/tutorial/target

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
"doc_module" : ("biotite",),
165165
# Set the NCBI API key
166166
"reset_modules" : (key.set_ncbi_api_key_from_env,),
167+
"remove_config_comments": True,
167168
}
168169

169170

doc/examples/scripts/structure/biological_assembly.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,6 @@
7575
temp = NamedTemporaryFile(suffix=".cif")
7676
strucio.save_structure(temp.name, biological_unit)
7777
# Visualization with PyMOL...
78+
# sphinx_gallery_pymol_image
7879

7980
temp.close()

doc/examples/scripts/structure/contact_sites.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*In contact* is defined as a pairwise atom distance below a given
88
threshold (in this case 4.0 Å).
99
10-
The identified contact residues are highlighted as sticks.
10+
The identified contact residues are highlighted as sticks.
1111
"""
1212

1313
# Code source: Patrick Kunzmann
@@ -77,4 +77,5 @@
7777
res_name = protein_l.res_name[protein_l.res_id == res_id][0]
7878
print(res_name.capitalize() + str(res_id))
7979

80-
# Visualization with PyMOL...
80+
# Visualization with PyMOL...
81+
# sphinx_gallery_pymol_image

doc/examples/scripts/structure/docking.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@
9999
ref_ligand = ref_ligand[info.standardize_order(ref_ligand)]
100100

101101
# Calculate the RMSD of the docked models to the correct binding mode
102-
# No superimposition prior to RMSD calculation, as we want to see
102+
# No superimposition prior to RMSD calculation, as we want to see
103103
# conformation differences with respect to the binding pocket
104104
rmsd = struc.rmsd(ref_ligand, docked_ligand)
105105

106-
# Evaluate correlation between RMSD and binding energies
106+
# Evaluate correlation between RMSD and binding energies
107107
correlation, p_value = spearmanr(energies, rmsd)
108108

109109
figure, ax = plt.subplots(figsize=(8.0, 6.0))
@@ -133,7 +133,7 @@
133133
# with the lowest RMSD in this case.
134134
# The docked conformation is shown as ball-and-stick model, the original
135135
# experimentally determined biotin conformation is shown in transparent
136-
# blue.
136+
# blue.
137137

138138

139139
# Get the best fitting model,
@@ -146,5 +146,6 @@
146146
ref_ligand = ref_ligand[ref_ligand.element!= "H"]
147147
docked_ligand = docked_ligand[docked_ligand.element!= "H"]
148148

149+
# Visualization with PyMOL...
149150
# sphinx_gallery_thumbnail_number = 2
150-
# Visualization with PyMOL...
151+
# sphinx_gallery_pymol_image

doc/examples/scripts/structure/leaflet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ def find_leaflets(structure, head_atom_mask,
5454
periodic : bool, optional,
5555
If true, periodic boundary conditions are considered.
5656
This requires that `structure` has an associated `box`.
57-
57+
5858
Returns
5959
-------
6060
leaflets : ndarray, dtype=bool, shape=(m,n)
6161
Multiple boolean masks, one for each identified leaflet.
6262
Each masks indicates which atoms of the input `structure`
6363
are in the leaflet.
6464
"""
65-
65+
6666
cell_list = struc.CellList(
6767
structure, cell_size=cutoff_distance, selection=head_atom_mask,
6868
periodic=periodic
@@ -75,7 +75,7 @@ def find_leaflets(structure, head_atom_mask,
7575
# This also removes all entries
7676
# for atoms not in 'head_atom_mask'
7777
if len(c) > 1]
78-
78+
7979
# 'leaflets' contains indices to head atoms
8080
# Broadcast each head atom index to all atoms in its corresponding
8181
# residue
@@ -112,5 +112,6 @@ def find_leaflets(structure, head_atom_mask,
112112
temp = NamedTemporaryFile(suffix=".pdb")
113113
strucio.save_structure(temp.name, structure)
114114
# Visualization with PyMOL...
115+
# sphinx_gallery_pymol_image
115116

116117
temp.close()

doc/examples/scripts/structure/normal_modes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
# Rescale, so that the largest vector has the length 'MAX_AMPLITUDE'
8686
vector_lenghts = np.sqrt(np.sum(mode_vectors**2, axis=-1))
8787
scale = MAX_AMPLITUDE / np.max(vector_lenghts)
88-
mode_vectors *= scale
88+
mode_vectors *= scale
8989

9090

9191
# Stepwise application of eigenvectors as smooth sine oscillation
@@ -111,6 +111,6 @@
111111
# Save as PDB for rendering a video with PyMOL
112112
temp = NamedTemporaryFile(suffix=".pdb")
113113
strucio.save_structure(temp.name, oscillating_structure)
114-
# biotite_static_image = normal_modes.gif
114+
# sphinx_gallery_static_image = "normal_modes.gif"
115115

116116
temp.close()

doc/examples/scripts/structure/peptide_assembly.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
# Reference peptide bond atom coordinates taken from 1l2y:
4343
# CA, C, N, O, H
4444
peptide_coord = np.array([
45-
[-8.608, 3.135, -1.618],
46-
[-7.117, 2.964, -1.897],
45+
[-8.608, 3.135, -1.618],
46+
[-7.117, 2.964, -1.897],
4747
[-6.379, 4.031, -2.228],
4848
[-6.634, 1.849, -1.758],
4949
[-6.821, 4.923, -2.394]
@@ -95,7 +95,7 @@ def append_residue(chain, residue):
9595
return residue
9696

9797
last_res_id = chain.res_id[-1]
98-
98+
9999
# Remove atoms removed by peptide bond
100100
chain = chain[
101101
(chain.res_id != last_res_id) |
@@ -125,8 +125,8 @@ def append_residue(chain, residue):
125125
# Reference peptide bond atom coordinates taken from 1l2y:
126126
# CA, C, N, O, H
127127
peptide_coord = np.array([
128-
[-8.608, 3.135, -1.618],
129-
[-7.117, 2.964, -1.897],
128+
[-8.608, 3.135, -1.618],
129+
[-7.117, 2.964, -1.897],
130130
[-6.379, 4.031, -2.228],
131131
[-6.634, 1.849, -1.758],
132132
[-6.821, 4.923, -2.394]
@@ -178,7 +178,7 @@ def append_residue(chain, residue):
178178
return residue
179179

180180
last_res_id = chain.res_id[-1]
181-
181+
182182
# Remove atoms removed by peptide bond
183183
chain = chain[
184184
(chain.res_id != last_res_id) |
@@ -217,14 +217,14 @@ def assemble_peptide(sequence):
217217
chain = struc.AtomArray(0)
218218
for i, res_name in enumerate(res_names):
219219
residue = info.residue(res_name)
220-
221-
# Superimpose residue to corresponding backbone coordinates
220+
221+
# Superimpose residue to corresponding backbone coordinates
222222
_, transformation = struc.superimpose(
223223
backbone_coord[3*i : 3*i + 3],
224224
residue.coord[np.isin(residue.atom_name, ["N", "CA", "C"])]
225225
)
226226
residue = struc.superimpose_apply(residue, transformation)
227-
227+
228228
chain = append_residue(chain, residue)
229229

230230
if i != 0:
@@ -253,5 +253,6 @@ def assemble_peptide(sequence):
253253
out_file = NamedTemporaryFile(suffix=".mmtf", delete=False)
254254
strucio.save_structure(out_file.name, chain)
255255
# Visualization with PyMOL...
256+
# sphinx_gallery_pymol_image
256257

257258
out_file.close()

doc/index.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This package bundles popular tasks in computational molecular biology
2222
into a uniform *Python* library.
2323
It can handle a major part of the typical workflow
2424
for sequence and biomolecular structure data:
25-
25+
2626
- Searching and fetching data from biological databases
2727
- Reading and writing popular sequence/structure file formats
2828
- Analyzing and editing sequence/structure data
@@ -40,11 +40,13 @@ As a result the user can skip writing code for basic functionality (like
4040
file parsers) and can focus on what their code makes unique - from
4141
small analysis scripts to entire bioinformatics software packages.
4242

43-
If you use *Biotite* in a scientific publication, please cite:
43+
If you use *Biotite* in a scientific publication, please cite one of the
44+
following articles:
4445

4546
.. bibliography::
4647

4748
Kunzmann2018
49+
Kunzmann2023
4850

4951
----
5052

@@ -134,7 +136,7 @@ databases, including the arguably most important ones: the *RCSB PDB* and the
134136
.. toctree::
135137
:maxdepth: 1
136138
:hidden:
137-
139+
138140
install
139141
tutorial/target/index
140142
apidoc/index

doc/references.bib

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ @article{Daniloski2021
196196
}
197197

198198
@article{Edgar2021,
199-
title = {Syncmers Are More Sensitive than Minimizers for Selecting Conserved K-mers in Biological Sequences},
199+
title = {Syncmers Are More Sensitive than Minimizers for Selecting Conserved Kmers in Biological Sequences},
200200
author = {Edgar, Robert},
201201
year = {2021},
202202
month = feb,
@@ -248,7 +248,7 @@ @article{Frith2011
248248

249249
@article{Gabb1996,
250250
title = {Finding and Visualizing Nucleic Acid Base Stacking},
251-
author = {Gabb, H. A. and Sanghani, S. R. and Robert, C. H. and Pr{\'e}vost, C.},
251+
author = {Gabb, H. A. and Sanghani, S. R. and Robert, C. H. and Prévost, C.},
252252
year = {1996},
253253
month = feb,
254254
journal = {Journal of Molecular Graphics},
@@ -260,7 +260,7 @@ @article{Gabb1996
260260
}
261261

262262
@article{Gasteiger1980,
263-
title = {Iterative Partial Equalization of Orbital Electronegativity{\textemdash}a Rapid Access to Atomic Charges},
263+
title = {Iterative Partial Equalization of Orbital Electronegativitya Rapid Access to Atomic Charges},
264264
author = {Gasteiger, Johann and Marsili, Mario},
265265
year = {1980},
266266
month = jan,
@@ -274,7 +274,7 @@ @article{Gasteiger1980
274274

275275
@article{Gibrat2018,
276276
title = {A Short Note on Dynamic Programming in a Band},
277-
author = {Gibrat, Jean-Fran{\c c}ois},
277+
author = {Gibrat, Jean-François},
278278
year = {2018},
279279
month = jun,
280280
journal = {BMC Bioinformatics},
@@ -301,7 +301,7 @@ @article{Gotoh1982
301301
@article{Hauser2013,
302302
title = {{{kClust}}: Fast and Sensitive Clustering of Large Protein Sequence Databases},
303303
shorttitle = {{{kClust}}},
304-
author = {Hauser, Maria and Mayer, Christian E. and S{\"o}ding, Johannes},
304+
author = {Hauser, Maria and Mayer, Christian E. and Söding, Johannes},
305305
year = {2013},
306306
month = aug,
307307
journal = {BMC Bioinformatics},
@@ -315,7 +315,7 @@ @article{Hauser2013
315315
@article{Hess2014,
316316
title = {Serious Games for Solving Protein Sequence Alignments - {{Combining}} Citizen Science and Gaming},
317317
author = {Hess, Martin and Wiemeyer, Josef and Hamacher, Kay and Goesele, Michael},
318-
editor = {G{\"o}bel, Stefan and Wiemeyer, Josef},
318+
editor = {Göbel, Stefan and Wiemeyer, Josef},
319319
year = {2014},
320320
journal = {Games for Training, Education, Health and Sports},
321321
series = {Lecture {{Notes}} in {{Computer Science}}},
@@ -345,15 +345,6 @@ @article{Iyamu2023
345345
issn = {2235-2988}
346346
}
347347

348-
@article{iyamuConservedEpitopeVAR2CSA2023,
349-
title = {A Conserved Epitope in {{VAR2CSA}} Is Targeted by a Cross-Reactive Antibody Originating from {{Plasmodium}} Vivax {{Duffy}} Binding Protein},
350-
author = {Iyamu, Uwa and Vinals, Daniel Ferrer and Tornyigah, Bernard and Arango, Eliana and Bhat, Rakesh and Adra, Trixie Rae and Grewal, Simranjit and Martin, Kimberly and Maestre, Amanda and Overduin, Michael and Hazes, Bart and Yanow, Stephanie K.},
351-
year = {2023},
352-
journal = {Frontiers in Cellular and Infection Microbiology},
353-
volume = {13},
354-
issn = {2235-2988}
355-
}
356-
357348
@article{Kabsch1976,
358349
title = {A Solution for the Best Rotation to Relate Two Sets of Vectors},
359350
author = {Kabsch, W.},
@@ -399,7 +390,7 @@ @article{Kim2018
399390
}
400391

401392
@article{Kojoma2006,
402-
title = {{{DNA}} Polymorphisms in the Tetrahydrocannabinolic Acid ({{THCA}}) Synthase Gene in ``Drug-Type'' and ``Fiber-Type'' {{Cannabis}} Sativa {{L}}.},
393+
title = {{{DNA}} Polymorphisms in the Tetrahydrocannabinolic Acid ({{THCA}}) Synthase Gene in Drug-Type and Fiber-Type {{Cannabis}} Sativa {{L}}.},
403394
author = {Kojoma, Mareshige and Seki, Hikaru and Yoshida, Shigeo and Muranaka, Toshiya},
404395
year = {2006},
405396
month = jun,
@@ -438,8 +429,23 @@ @article{Kunzmann2020
438429
doi = {10.1186/s12859-020-3526-6}
439430
}
440431

432+
@article{Kunzmann2023,
433+
title = {Biotite: New Tools for a Versatile {{Python}} Bioinformatics Library},
434+
shorttitle = {Biotite},
435+
author = {Kunzmann, Patrick and Müller, Tom David and Greil, Maximilian and Krumbach, Jan Hendrik and Anter, Jacob Marcel and Bauer, Daniel and Islam, Faisal and Hamacher, Kay},
436+
year = {2023},
437+
month = dec,
438+
journal = {BMC Bioinformatics},
439+
volume = {24},
440+
number = {1},
441+
pages = {1--19},
442+
publisher = {{BioMed Central}},
443+
issn = {1471-2105},
444+
doi = {10.1186/s12859-023-05345-6}
445+
}
446+
441447
@article{Labesse1997,
442-
title = {P-{{SEA}}: A New Efficient Assignment of Secondary Structure from {{C$\alpha$}} Trace of Proteins},
448+
title = {P-{{SEA}}: A New Efficient Assignment of Secondary Structure from {{}} Trace of Proteins},
443449
shorttitle = {P-{{SEA}}},
444450
author = {Labesse, G. and Colloc'h, N. and Pothier, J. and Mornon, J.-P.},
445451
year = {1997},
@@ -551,7 +557,7 @@ @article{Martin2005
551557

552558
@article{Meija2016,
553559
title = {Atomic Weights of the Elements 2013 ({{IUPAC Technical Report}})},
554-
author = {Meija, Juris and Coplen, Tyler B. and Berglund, Michael and Brand, Willi A. and Bi{\`e}vre, Paul De and Gr{\"o}ning, Manfred and Holden, Norman E. and Irrgeher, Johanna and Loss, Robert D. and Walczyk, Thomas and Prohaska, Thomas},
560+
author = {Meija, Juris and Coplen, Tyler B. and Berglund, Michael and Brand, Willi A. and Bièvre, Paul De and Gröning, Manfred and Holden, Norman E. and Irrgeher, Johanna and Loss, Robert D. and Walczyk, Thomas and Prohaska, Thomas},
555561
year = {2016},
556562
month = mar,
557563
journal = {Pure and Applied Chemistry},
@@ -741,7 +747,7 @@ @article{Steele2021
741747

742748
@article{Steinegger2017,
743749
title = {{{MMseqs2}} Enables Sensitive Protein Sequence Searching for the Analysis of Massive Data Sets},
744-
author = {Steinegger, Martin and S{\"o}ding, Johannes},
750+
author = {Steinegger, Martin and Söding, Johannes},
745751
year = {2017},
746752
month = nov,
747753
journal = {Nature Biotechnology},
@@ -807,7 +813,7 @@ @article{Tsai1999
807813
}
808814

809815
@article{Tyler2018,
810-
title = {Evaluation of {{Oxford Nanopore}}'s {{MinION}} Sequencing Device for Microbial Whole Genome Sequencing Applications},
816+
title = {Evaluation of {{Oxford Nanopore}}s {{MinION}} Sequencing Device for Microbial Whole Genome Sequencing Applications},
811817
author = {Tyler, Andrea D. and Mataseje, Laura and Urfano, Chantel J. and Schmidt, Lisa and Antonation, Kym S. and Mulvey, Michael R. and Corbett, Cindi R.},
812818
year = {2018},
813819
month = jul,
@@ -875,7 +881,7 @@ @article{Yang2003
875881
@article{Yates2022,
876882
title = {Ensembl {{Genomes}} 2022: An Expanding Genome Resource for Non-Vertebrates},
877883
shorttitle = {Ensembl {{Genomes}} 2022},
878-
author = {Yates, Andrew~D and Allen, James and Amode, Ridwan M and Azov, Andrey G and Barba, Matthieu and Becerra, Andr{\'e}s and Bhai, Jyothish and Campbell, Lahcen~I and Carbajo~Martinez, Manuel and Chakiachvili, Marc and Chougule, Kapeel and Christensen, Mikkel and {Contreras-Moreira}, Bruno and Cuzick, Alayne and Da~Rin~Fioretto, Luca and Davis, Paul and De~Silva, Nishadi~H and Diamantakis, Stavros and Dyer, Sarah and Elser, Justin and Filippi, Carla V and Gall, Astrid and Grigoriadis, Dionysios and {Guijarro-Clarke}, Cristina and Gupta, Parul and {Hammond-Kosack}, Kim~E and Howe, Kevin L and Jaiswal, Pankaj and Kaikala, Vinay and Kumar, Vivek and Kumari, Sunita and Langridge, Nick and Le, Tuan and Luypaert, Manuel and Maslen, Gareth L and Maurel, Thomas and Moore, Benjamin and Muffato, Matthieu and Mushtaq, Aleena and Naamati, Guy and Naithani, Sushma and Olson, Andrew and Parker, Anne and Paulini, Michael and Pedro, Helder and Perry, Emily and Preece, Justin and {Quinton-Tulloch}, Mark and Rodgers, Faye and Rosello, Marc and Ruffier, Magali and Seager, James and Sitnik, Vasily and Szpak, Michal and Tate, John and {Tello-Ruiz}, Marcela~K and Trevanion, Stephen~J and Urban, Martin and Ware, Doreen and Wei, Sharon and Williams, Gary and Winterbottom, Andrea and Zarowiecki, Magdalena and Finn, Robert~D and Flicek, Paul},
884+
author = {Yates, Andrew~D and Allen, James and Amode, Ridwan M and Azov, Andrey G and Barba, Matthieu and Becerra, Andrés and Bhai, Jyothish and Campbell, Lahcen~I and Carbajo~Martinez, Manuel and Chakiachvili, Marc and Chougule, Kapeel and Christensen, Mikkel and {Contreras-Moreira}, Bruno and Cuzick, Alayne and Da~Rin~Fioretto, Luca and Davis, Paul and De~Silva, Nishadi~H and Diamantakis, Stavros and Dyer, Sarah and Elser, Justin and Filippi, Carla V and Gall, Astrid and Grigoriadis, Dionysios and {Guijarro-Clarke}, Cristina and Gupta, Parul and {Hammond-Kosack}, Kim~E and Howe, Kevin L and Jaiswal, Pankaj and Kaikala, Vinay and Kumar, Vivek and Kumari, Sunita and Langridge, Nick and Le, Tuan and Luypaert, Manuel and Maslen, Gareth L and Maurel, Thomas and Moore, Benjamin and Muffato, Matthieu and Mushtaq, Aleena and Naamati, Guy and Naithani, Sushma and Olson, Andrew and Parker, Anne and Paulini, Michael and Pedro, Helder and Perry, Emily and Preece, Justin and {Quinton-Tulloch}, Mark and Rodgers, Faye and Rosello, Marc and Ruffier, Magali and Seager, James and Sitnik, Vasily and Szpak, Michal and Tate, John and {Tello-Ruiz}, Marcela~K and Trevanion, Stephen~J and Urban, Martin and Ware, Doreen and Wei, Sharon and Williams, Gary and Winterbottom, Andrea and Zarowiecki, Magdalena and Finn, Robert~D and Flicek, Paul},
879885
year = {2022},
880886
month = jan,
881887
journal = {Nucleic Acids Research},

0 commit comments

Comments
 (0)