Skip to content

Commit

Permalink
comments to docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
kedhammar committed May 23, 2024
1 parent fd739f9 commit a676df0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions anglerfish/demux/adaptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit a676df0

Please sign in to comment.