minorg.pam module

class minorg.pam.PAM(pam='NGG', gRNA_length=20)[source]

Bases: object

PAM object.

Tracks PAM pattern, gRNA length, as well as PAM regex.

raw_pam[source]

original PAM pattern used to create this PAM object

Type

str

pam[source]

expanded PAM pattern

Type

str

gRNA_length[source]

gRNA length

Type

int

__init__(pam='NGG', gRNA_length=20)[source]

Create a PAM object.

Parameters
  • pam (str/PAM) – PAM object or str of PAM pattern (if PAM object provided, attributes are copied)

  • gRNA_length (int) – int length of gRNA (bp)

Returns

PAM

infer_full() None[source]

Expand PAM pattern to full pattern by inserting ‘N’ and ‘.’ where necessary.

In the absence of ‘N’ in the PAM pattern, MINORg will assume 3’ PAM with 1 spacer base (such as in the 3’ ‘NGG’ of SpCas9). If a pattern includes an ‘N’ at either end, MINORg will assume that the gRNA is directly adjacent to the ‘N’ base of the pattern. To specify a 5’ PAM in the absence of ‘N’ in the PAM pattern, ‘.’ should be inserted where the gRNA is.

expand_ambiguous() None[source]

Map ambiguous bases.

parse() None[source]

Wrapper for infer_full() and expand_ambiguous().

regex(gRNA_length: Optional[int] = None) None[source]

Generate regex based on PAM and gRNA length.

Square brackets not allowed in PAM pattern unless they contain only A, T, G, C, or U.

Parameters

gRNA_length (int) – optional, gRNA lenth (bp); if not provided, self.gRNA_length is used.

Returns

regex pattern that can be used to match gRNA

Return type

_regex.Pattern

five_prime()[source]

Get PAM pattern on 5’ side of gRNA

Returns

str

three_prime()[source]

Get PAM pattern on 3’ side of gRNA

Returns

str

five_prime_maxlen()[source]

Get maximum length of PAM pattern on 5’ side of gRNA.

Calls _pattern_max_length() on output of five_prime().

Returns

int

three_prime_maxlen()[source]

Get maximum length of PAM pattern on 3’ side of gRNA.

Calls _pattern_max_length() on output of three_prime().

Returns

int

minorg.pam.SpCas9 = '.NGG'[source]

SpCas9 (Streptococcus pyogenes) PAM

3’ NGG

Type

str

minorg.pam.spcas9 = '.NGG'[source]

SpCas9 (Streptococcus pyogenes) PAM

3’ NGG

Type

str

minorg.pam.SaCas9N = '.NGRRN'[source]

SaCas9N (Staphylococcus aureus) PAM

3’ NGRRN

Type

str

minorg.pam.sacas9n = '.NGRRN'[source]

SaCas9N (Staphylococcus aureus) PAM

3’ NGRRN

Type

str

minorg.pam.SaCas9T = '.NGRRT'[source]

SaCas9T (Staphylococcus aureus) PAM

3’ NGRRT

Type

str

minorg.pam.sacas9t = '.NGRRT'[source]

SaCas9T (Staphylococcus aureus) PAM

3’ NGRRT

Type

str

minorg.pam.NmeCas9 = '.NNNNGATT'[source]

NmeCas9 (Neisseria meningitidis) PAM

3’ NNNNGATT

Type

str

minorg.pam.nmecas9 = '.NNNNGATT'[source]

NmeCas9 (Neisseria meningitidis) PAM

3’ NNNNGATT

Type

str

minorg.pam.CjCas9 = '.NNNNRYAC'[source]

CjCas9 (Campylobacter jejuni) PAM

3’ NNNNRYAC

Type

str

minorg.pam.cjcas9 = '.NNNNRYAC'[source]

CjCas9 (Campylobacter jejuni) PAM

3’ NNNNRYAC

Type

str

minorg.pam.StCas9 = '.NNAGAAW'[source]

StCas9 (Streptococcus thermophilus) PAM

3’ NNAGAAW

Type

str

minorg.pam.stcas9 = '.NNAGAAW'[source]

StCas9 (Streptococcus thermophilus) PAM

3’ NNAGAAW

Type

str

minorg.pam.Cas12a = 'TTTV.'[source]

Cas12a (Cpf-1) PAM

5’ TTTV

Type

str

minorg.pam.cas12a = 'TTTV.'[source]

Cas12a (Cpf-1) PAM

5’ TTTV

Type

str

minorg.pam.AacCas12b = 'TTN.'[source]

AacCas12b (Alicyclobacillus acidiphilus) PAM

5’ TTN

Type

str

minorg.pam.aaccas12b = 'TTN.'[source]

AacCas12b (Alicyclobacillus acidiphilus) PAM

5’ TTN

Type

str

minorg.pam.BhCas12b = 'DTTN.'[source]

BhCas12b (Bacillus hisashii) PAM

5’ DTTN

Type

str

minorg.pam.bhcas12b = 'DTTN.'[source]

BhCas12b (Bacillus hisashii) PAM

5’ DTTN

Type

str