From e9a0192f86efddfb8a33f3f2cfe8cc9eb0564cce Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavalias-github@xavier.robin.name>
Date: Thu, 27 Jun 2024 15:44:06 +0200
Subject: [PATCH] doc: refactor seq.alg submodules

---
 modules/index.rst                       | 14 +++++++++++--
 modules/mol/alg/doc/stereochemistry.rst |  2 +-
 modules/seq/alg/doc/aaindex.rst         | 22 +++++++++++++++++++
 modules/seq/alg/doc/renumber.rst        |  7 +++++++
 modules/seq/alg/doc/seqalg.rst          | 28 ++++++-------------------
 5 files changed, 48 insertions(+), 25 deletions(-)
 create mode 100644 modules/seq/alg/doc/aaindex.rst
 create mode 100644 modules/seq/alg/doc/renumber.rst

diff --git a/modules/index.rst b/modules/index.rst
index 9727d322b..e307b9702 100644
--- a/modules/index.rst
+++ b/modules/index.rst
@@ -13,16 +13,26 @@ OpenStructure documentation
   geom/geom
   mol/base/mol
   mol/alg/molalg
+  mol/alg/chain_mapping
+  mol/alg/contact_score
+  mol/alg/dockq
+  mol/alg/helix_kinks
+  mol/alg/ligand_scoring
+  mol/alg/qsscore
+  mol/alg/scoring
+  mol/alg/stereochemistry
+  mol/alg/structure_analysis
+  mol/alg/trajectory_analysis
   mol/mm/molmm
   conop/conop
   img/base/img
   img/alg/alg
   seq/base/seq
   seq/alg/seqalg
+  seq/alg/renumber
+  seq/alg/aaindex
   db/db
-
   bindings/bindings
-
   io/io
   gfx/gfx
   gui/gui
diff --git a/modules/mol/alg/doc/stereochemistry.rst b/modules/mol/alg/doc/stereochemistry.rst
index 6c9ccee87..0ed0dd38f 100644
--- a/modules/mol/alg/doc/stereochemistry.rst
+++ b/modules/mol/alg/doc/stereochemistry.rst
@@ -1,5 +1,5 @@
 :mod:`mol.alg.stereochemistry <ost.mol.alg.stereochemistry>` -- Stereochemistry Checks
---------------------------------------------------------------------------------
+--------------------------------------------------------------------------------------
 
 .. warning::
 
diff --git a/modules/seq/alg/doc/aaindex.rst b/modules/seq/alg/doc/aaindex.rst
new file mode 100644
index 000000000..cb8754814
--- /dev/null
+++ b/modules/seq/alg/doc/aaindex.rst
@@ -0,0 +1,22 @@
+:mod:`seq.alg.aaindex <ost.seq.alg.aaindex>` -- AAIndex annotations
+--------------------------------------------------------------------------------
+
+.. module:: ost.seq.alg.aaindex
+   :synopsis: AAIndex annotations
+
+.. autoclass:: ost.seq.alg.aaindex.AAIndex
+  :members:
+  :special-members: __getitem__
+
+The annotations/scores can either refer to single amino acids or represent
+pairwise values. The two types are:
+
+.. autoclass:: ost.seq.alg.aaindex.AnnoType
+  :members:
+  :undoc-members:
+
+The actual data of an entry in the aaindex database is stored in a
+:class:`aaindex.AAIndexData` object:
+
+.. autoclass:: ost.seq.alg.aaindex.AAIndexData
+  :members:
diff --git a/modules/seq/alg/doc/renumber.rst b/modules/seq/alg/doc/renumber.rst
new file mode 100644
index 000000000..ff1618839
--- /dev/null
+++ b/modules/seq/alg/doc/renumber.rst
@@ -0,0 +1,7 @@
+:mod:`seq.alg.renumber <ost.seq.alg.renumber>` -- Renumber entities
+--------------------------------------------------------------------
+
+.. module:: ost.seq.alg.renumber
+   :synopsis: Renumber entities
+
+.. autofunction:: ost.seq.alg.renumber.Renumber
diff --git a/modules/seq/alg/doc/seqalg.rst b/modules/seq/alg/doc/seqalg.rst
index a293192f7..98e0568c6 100644
--- a/modules/seq/alg/doc/seqalg.rst
+++ b/modules/seq/alg/doc/seqalg.rst
@@ -4,6 +4,12 @@
 .. module:: ost.seq.alg
   :synopsis: Algorithms for sequences
 
+Submodules
+--------------------------------------------------------------------------------
+
+* :doc:`aaindex – AAIndex annotations <aaindex>`
+* :doc:`renumber – Renumber entities <renumber>`
+
 Algorithms for Alignments
 --------------------------------------------------------------------------------
 
@@ -123,8 +129,6 @@ Algorithms for Alignments
 
   :returns: List of column entropies
 
-.. autofunction:: ost.seq.alg.renumber.Renumber
-
 .. function:: SequenceIdentity(aln, ref_mode=seq.alg.RefMode.ALIGNMENT, seq_a=0, seq_b=1)
 
   Calculates the sequence identity between two sequences at index seq_a and seq_b in
@@ -1035,23 +1039,3 @@ etc.) to be set, which is the case if you load a file in hhm format.
 
   :raises:  Exception if profile doesn't have HMM information assigned
 
-
-AAIndex annotations
--------------------
-
-.. autoclass:: ost.seq.alg.aaindex.AAIndex
-  :members:
-  :special-members: __getitem__
-
-The annotations/scores can either refer to single amino acids or represent
-pairwise values. The two types are:
-
-.. autoclass:: ost.seq.alg.aaindex.AnnoType
-  :members:
-  :undoc-members:
-
-The actual data of an entry in the aaindex database is stored in a 
-:class:`aaindex.AAIndexData` object:
-
-.. autoclass:: ost.seq.alg.aaindex.AAIndexData
-  :members:
-- 
GitLab