Scanner#

class lightmotif.Scanner(pssm, sequence, threshold=0.0, block_size=256)#

A fast scanner for identifying high scoring positions in a sequence.

This class internally uses a discretized version of the matrix to identify candidate positions, and then rescores blocks with the full algorithm only if needed. Using a Scanner is likely faster than using the calculate method for rare sites or high thresholds.

Note

This algorithm is only available for DNA motifs because of implementation requirements.

__iter__()#

Implement iter(self).

__next__()#

Implement next(self).

class lightmotif.Hit#

A hit found by a Scanner.

position#

The index of the hit, zero-based.

Type:

int

score#

The score of the scoring matrix at the hit position.

Type:

float