pydna.sequence_regex

pydna.sequence_regex.compute_regex_site(site: str) str[source]

Creates a regex pattern from a string that may contain degenerate bases.

Parameters:

site – The string to convert to a regex pattern.

Returns:

The regex pattern.

pydna.sequence_regex.dseqrecord_finditer(pattern: str, seq: Dseqrecord) list[Match][source]

Finds all matches of a regex pattern in a Dseqrecord.

Parameters:
  • pattern – The regex pattern to search for.

  • seq – The Dseqrecord to search in.

Returns:

A list of matches.