snapatac2.PyDNAMotif#

class snapatac2.PyDNAMotif(id, pwm)#

Python object representing DNA position weight matrix.

The matrix is expected to be a PWM shaped (length, 4) in A/C/G/T order.

Parameters:
  • id – Unique identifier of the motif.

  • pwm – Position weight matrix as a 2D numpy array of shape (length, 4).

See also

read_motifs

Attributes

family

The family of the motif.

id

The unique identifier of the motif.

name

The name of the motif.

Methods

info_content()

Return the information content of the motif.

with_nucl_prob([a, c, g, t])

Create a motif scanner with specified nucleotide background probabilities.