snapatac2.PyDNAMotif.with_nucl_prob#

PyDNAMotif.with_nucl_prob(a=0.25, c=0.25, g=0.25, t=0.25)#

Create a motif scanner with specified nucleotide background probabilities.

Use this method before scanning sequences or testing motif enrichment. The background probabilities are used to convert the PWM into a scanner.

Anti-Patterns#

  • Do NOT pass probabilities in an order other than A/C/G/T.

  • Do NOT pass negative probabilities.

type a:

float

param a:

Background probability of nucleotide A. Default is 0.25.

type a:

float

type c:

float

param c:

Background probability of nucleotide C. Default is 0.25.

type c:

float

type g:

float

param g:

Background probability of nucleotide G. Default is 0.25.

type g:

float

type t:

float

param t:

Background probability of nucleotide T. Default is 0.25.

type t:

float

returns:

A DNA motif scanner object.

rtype:

PyDNAMotifScanner

Examples

>>> scanner = motif.with_nucl_prob(a=0.25, c=0.25, g=0.25, t=0.25)