snapatac2.PyDNAMotifScanner.exists#

PyDNAMotifScanner.exists(seqs, pvalue=1e-05, rc=True)#

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

Use this method to scan many sequences with parallel computation. The returned list preserves the input sequence order.

Anti-Patterns#

  • Do NOT use this method when per-hit positions are required; it only returns booleans.

type seqs:

list[str]

param seqs:

List of DNA sequences to scan.

type seqs:

list[str]

type pvalue:

float

param pvalue:

P-value threshold for reporting motif occurrences. Default is 1e-5.

type pvalue:

float

type rc:

bool

param rc:

Whether to consider reverse complement matches. Default is True.

type rc:

bool

returns:

A list of booleans indicating whether the motif exists in each sequence.

rtype:

list[bool]

Examples

>>> scanner.exists(["ACGTACGT", "TTTTAAAA"], pvalue=1e-5, rc=True)