From c9f019198bf7fc338f92dcb23b5f67dfc98efcdf Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Tue, 19 Jan 2021 17:23:30 +0100
Subject: [PATCH] Add brief importable default methods description.

---
 libconsensus/__init__.py     | 1 +
 libconsensus/libconsensus.py | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/libconsensus/__init__.py b/libconsensus/__init__.py
index c81447e..742d4b4 100644
--- a/libconsensus/__init__.py
+++ b/libconsensus/__init__.py
@@ -3,5 +3,6 @@ __licence__ = "GNU GPLv3"
 __version__ = 0.1
 from .libconsensus import (
     ali2cons,
+    default_cons_methods,
     fasta2cons,
     )
diff --git a/libconsensus/libconsensus.py b/libconsensus/libconsensus.py
index 1177cf2..9faae8e 100644
--- a/libconsensus/libconsensus.py
+++ b/libconsensus/libconsensus.py
@@ -106,6 +106,15 @@ def counts_add(cumul_counts, counter_item):
     return cumul_counts[1] + counter_item[1]
 
 
+# This should be updated if `col_consensus` changes.
+default_cons_methods = """
+A consensus of the aligned sequences was computed using a rather conservative approach:
+
+If one nucleotide accounted for at least 75% of an alignment column, this column was represented by this nucleotide.
+Otherwise, the "N" ambiguity code was used.
+"""
+
+
 def col_consensus(column, cum_freq=0.75, do_iupac=False):
     """
     Determine the consensus of the letters present in *column*.
-- 
GitLab