primer3.p3helpers
Contains Cython functions and classes that aid primer design
- primer3.p3helpers.reverse_complement(seq, do_sanitize=False)
Compute reverse complement of the python string sequence
- Parameters:
seq (
str
) – sequence stringdo_sanitize – If True, convert non-IUPAC characters to N’s
- Return type:
str
- Returns:
Reverse complement of sequence string
- Raises:
ValueError – Invalid base in sequence
- primer3.p3helpers.reverse_complement_b(seq, do_sanitize=False)
Compute reverse complement of the bytes sequence
- Parameters:
seq (
bytes
) – sequence in bytesdo_sanitize – If True, convert non-IUPAC characters to N’s
- Return type:
bytes
- Returns:
Reverse complement of sequence in bytes
- Raises:
ValueError – Invalid base in sequence
OSError –
malloc
failure
- primer3.p3helpers.sanitize_sequence(seq)
Sanitize sequence with non-standard bases with `N`s IUPAC {R,Y,M,K,S,W,H,D,B,V,r,y,m,k,s,w,h,d,b,v}
IUPAC non-{A,C,G,T,a,c,g,t} bases become {N, n}
NOTE: Consider keeping a copy of original
seq
argument for record keeping