From 6dfd83f3b52eff2c7f444b0c88434b5058f795dc Mon Sep 17 00:00:00 2001 From: Valentyn Bezshapkin Date: Mon, 5 Jan 2026 12:34:57 +0100 Subject: [PATCH] docs: `Database` with custom scoring example - Closes: #9 --- src/pyopal/lib.pyx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pyopal/lib.pyx b/src/pyopal/lib.pyx index 0b919b0..77463af 100644 --- a/src/pyopal/lib.pyx +++ b/src/pyopal/lib.pyx @@ -486,6 +486,13 @@ cdef class Database(BaseDatabase): Create a new database with the given sequences. + Example: + >>> # creating a database with a custom scoring matrix + >>> from scoring_matrices import ScoringMatrix + >>> + >>> alphabet = ScoringMatrix.from_name("VTML80").alphabet + >>> db = pyopal.Database(["ATGC", "TTCA"], alphabet=alphabet) + """ super().__init__(alphabet=alphabet) # reset the collection if `__init__` is called more than once