From a676df0ac756608378ec33e69ac92fc83980d8be Mon Sep 17 00:00:00 2001 From: kedhammar Date: Thu, 23 May 2024 10:39:31 +0000 Subject: [PATCH] comments to docstrings --- anglerfish/demux/adaptor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/anglerfish/demux/adaptor.py b/anglerfish/demux/adaptor.py index 18e4ede..d4dea4f 100644 --- a/anglerfish/demux/adaptor.py +++ b/anglerfish/demux/adaptor.py @@ -106,7 +106,9 @@ def get_fastastring(self, insert_Ns=True): class AdaptorPart: - # This class is used either the i5 or i7 adaptor + """This class is used for the i5 or i7 adaptor. + """ + def __init__(self, sequence, name, delim, index): self.sequence = sequence self.name = name @@ -152,16 +154,18 @@ def len_after_index_region(self): return self.len_after_index -# General function to check if a string contains a pattern def has_match(delim, seq): + """General function to check if a string contains a pattern. + """ match = re.search(delim, seq) if match is None: return False return True -# Fetch all adaptors def load_adaptors(raw=False) -> list[Adaptor] | list[dict]: + """Fetch all adaptors. + """ p = importlib.resources.files("anglerfish.config").joinpath("adaptors.yaml") assert isinstance(p, os.PathLike)