snapatac2.PyDNAMotifScanner#

class snapatac2.PyDNAMotifScanner#

Scan DNA sequences with a motif-specific scanner.

Use this object to find motif hits, test whether a motif exists in one or more sequences, or construct a motif enrichment test from background sequences. Create it from PyDNAMotif.with_nucl_prob.

Anti-Patterns#

  • Do NOT instantiate this class directly; create it from a PyDNAMotif.

  • Do NOT assume find checks reverse complements. Use exist(..., rc=True) or exists(..., rc=True) when reverse-complement matching is required.

Attributes

id

Return the unique identifier of the scanned motif.

name

Return the optional display name of the scanned motif.

Methods

exist(seq[, pvalue, rc])

Check if the motif exists in the given sequence above the specified p-value threshold.

exists(seqs[, pvalue, rc])

Batch check if the motif exists in the given sequences above the specified p-value threshold.

find(seq[, pvalue, report_pvalue])

Find motif occurrences in the given sequence above the specified p-value threshold.

with_background(seqs[, pvalue])

Create a motif test object using background sequences.