snapatac2.PyDNAMotifScanner.exist#
- PyDNAMotifScanner.exist(seq, pvalue=1e-05, rc=True)#
Check if the motif exists in the given sequence above the specified p-value threshold.
Use this method when only a boolean motif-presence result is needed. Set
rc=Trueto test both the sequence and its reverse complement.Anti-Patterns#
Do NOT use this method when hit positions are required; use
findfor forward-strand hit positions.
- type seq:
str
- param seq:
DNA sequence to scan.
- type seq:
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:
True if the motif exists in the sequence, False otherwise.
- rtype:
bool
Examples
>>> scanner.exist("ACGTACGT", pvalue=1e-5, rc=True)