picking
Methods and class for building and scoring primer pairs from a list of left and right primers.¶
Typically, primer pairs are built from a list of left and right primers for a
given target with the build_primer_pairs()
method. The returned primer pairs are automatically scored (using the
score() method).
Module contents¶
Contains the following public classes and methods:
score()-- Scores the amplicon amplified by a primer pair in a manner similar to Primer3.build_primer_pairs()-- Builds primer pairs from individual left and primers.
Classes¶
Functions¶
build_primer_pairs ¶
build_primer_pairs(
left_primers: Sequence [Oligo ],
right_primers: Sequence [Oligo ],
target: Span ,
amplicon_sizes: MinOptMax [int ],
amplicon_tms: MinOptMax [float ],
max_heterodimer_tm: Optional [float ],
weights: PrimerAndAmpliconWeights ,
fasta_path: Path ,
) -> Iterator [PrimerPair ]
Builds primer pairs from individual left and primers.
Only primer pairs that meet the requirements for amplicon sizes and tms will be returned.
In addition, if max_heterodimer_tm is provided then primer pairs with a heterodimer tm
exceeding the maximum will also be discarded.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
left_primers |
|
the left primers |
required |
right_primers |
|
the right primers |
required |
target |
|
the genome mapping for the target |
required |
amplicon_sizes |
|
minimum, optimal, and maximum amplicon sizes (lengths) |
required |
amplicon_tms |
|
minimum, optimal, and maximum amplicon Tms |
required |
max_heterodimer_tm |
|
if supplied, heterodimer Tms will be calculated for primer pairs, and those exceeding the maximum Tm will be discarded |
required |
weights |
|
the set of penalty weights |
required |
fasta_path |
|
the path to the FASTA file from which the amplicon sequence will be retrieved. |
required |
Returns:
| Type | Description |
|---|---|
|
An iterator over all the valid primer pairs, sorted by primer pair penalty. |
|
Primer pairs with smaller penalties are returned first. |
Source code in prymer/api/picking.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
score ¶
score(
left_primer: Oligo ,
right_primer: Oligo ,
amplicon: Span ,
amplicon_tm: float ,
amplicon_sizes: MinOptMax [int ],
amplicon_tms: MinOptMax [float ],
weights: PrimerAndAmpliconWeights ,
) -> float
Score the amplicon in a manner similar to Primer3
Sums the following:
- Primer penalties: the provided left and right primer penalties
- Amplicon size: The difference between the current amplicon size and optimal amplicon size scaled by the product size weight. Is zero if the optimal amplicon size is zero.
- Amplicon Tm: The difference in melting temperature between the calculated and optimal, weighted by the product melting temperature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
left_primer |
|
the left primer |
required |
right_primer |
|
the right primer |
required |
amplicon |
|
the amplicon mapping |
required |
amplicon_tm |
|
the melting temperature of the amplicon |
required |
amplicon_sizes |
|
minimum, optimal, and maximum amplicon sizes (lengths) |
required |
amplicon_tms |
|
minimum, optimal, and maximum amplicon Tms |
required |
weights |
|
the set of penalty weights |
required |
Returns:
| Type | Description |
|---|---|
|
the penalty for the whole amplicon. |