Skip to content

Commit

Permalink
Document the famsa_info function and pyfamsa constants
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Aug 28, 2024
1 parent b256b4f commit 2f77de0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 17 deletions.
26 changes: 9 additions & 17 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,35 @@ API Reference

Aligner <aligner>
Sequence <sequence>
Gapped Sequence <sequence>
Gapped Sequence <gapped_sequence>
Alignment <alignment>
Guide Tree <guide_tree>
Utilities <utilities>


Aligner
Classes
-------

.. autosummary::
:nosignatures:

Aligner


Sequence
--------

.. autosummary::
:nosignatures:

Sequence
GappedSequence
Alignment
GuideTree


Alignment
Functions
---------

.. autosummary::
:nosignatures:

Alignment

famsa_info

GuideTree
Constants
---------

.. autosummary::
:nosignatures:

GuideTree
MIQS
24 changes: 24 additions & 0 deletions docs/api/utilities.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Utilities
=========

.. currentmodule:: pyfamsa

Constants
---------

.. data:: MIQS
:type: scoring_matrices.ScoringMatrix

The MIQS scoring matrix proposed by Yamada & Tomii (2014), used by
default in FAMSA for scoring alignments.

.. data:: FAMSA_ALPHABET
:type: str

The alphabet used by FAMSA to encode input sequences.


Functions
---------

.. autofunction:: pyfamsa.famsa_info
2 changes: 2 additions & 0 deletions pyfamsa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"GuideTree",
"Sequence",
"famsa_info",
"FAMSA_ALPHABET",
"MIQS"
]

__author__ = "Martin Larralde <martin.larralde@embl.de>"
Expand Down
12 changes: 12 additions & 0 deletions pyfamsa/_famsa.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ MIQS = _make_miqs()

def famsa_info():
"""Get information about the embedded FAMSA version.
This function returns an anonymous named tuple with attributes
``version``, ``version_info``, ``date`` and ``authors`` that can
be used to get the build information from FAMSA.
Example:
>>> info = famsa_info()
>>> info.version
'2.2.2'
>>> info.date
datetime.date(2022, 10, 9)
"""
_VersionInfo = collections.namedtuple("_VersionInfo", ["major", "minor", "micro"])
_Info = collections.namedtuple("_Info", ["version", "version_info", "date", "authors"])
Expand Down

0 comments on commit 2f77de0

Please sign in to comment.