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.
- 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.
- parse() None [source]
Wrapper for
infer_full()
andexpand_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_maxlen()[source]
Get maximum length of PAM pattern on 5’ side of gRNA.
Calls
_pattern_max_length()
on output offive_prime()
.- Returns
int
- three_prime_maxlen()[source]
Get maximum length of PAM pattern on 3’ side of gRNA.
Calls
_pattern_max_length()
on output ofthree_prime()
.- Returns
int