Skip to main content
This guide walks through the complete workflow for selecting optimal primer pairs in PROTÉGÉ PD’s web interface.

Overview

Primer selection in PROTÉGÉ PD is a two-step process: first select a forward primer from the main scatter plot, then choose a compatible reverse primer from the zoomed view.

Selecting Forward Primers

1

View the Main Scatter Plot

Examine the “Primer degeneracies by position” scatter plot showing all forward primer candidates
2

Identify Candidates

Look for primers with optimal characteristics:
  • Lower degeneracies (lower on y-axis) are generally better
  • Consider position based on your target region
  • Hover over points to preview primer sequences
3

Click to Select

Click on a point to select it as your forward primer (protege.py:650-662)
4

Confirm Selection

The interface displays: “You choose primer on [position] with [degeneracies] degeneracies”
Clicking a forward primer automatically triggers the zoom view to update with compatible reverse primers (protege.py:664-691).

Selecting Reverse Primers

After selecting a forward primer, the zoom scatter plot displays reverse primer candidates.
1

Review the Zoom Plot

The zoom view shows reverse primers in the region surrounding your forward primer selection
2

Evaluate Candidates

Look for reverse primers with:
  • Appropriate distance from the forward primer (based on desired amplicon size)
  • Low degeneracies for better specificity
  • Compatible melting temperatures (check the Tm distribution)
3

Click to Select

Click on a point in the zoom plot to select your reverse primer (protege.py:694-710)
4

View Selection Confirmation

The interface displays: “You choose reverse primer on [position] with [degeneracies] degeneracies, primer [sequence]“

Viewing Primer Sequences

Once both primers are selected, the interface displays the complete primer pair.

Primer Pair Display

The selected primers are shown in the format (protege.py:720-745):
You choose [FORWARD_SEQUENCE] --- [REVERSE_SEQUENCE]

Sequence Extraction

The sequences are extracted from the click data:
  • Forward primer: Retrieved from the main scatter plot’s text field (protege.py:726)
  • Reverse primer: Retrieved from the zoom plot’s text field (protege.py:729)
Both primers must be selected to see the primer pair display. If only one primer is selected, the display remains empty.

Choosing Tm Calculation Method

PROTÉGÉ PD offers four methods for calculating melting temperatures.

Available Methods

The radio buttons (protege.py:538-547) provide these options:
Value: 1A simple approximation based on primer length and composition:
  • Fast calculation
  • Good for initial screening
  • Default method on interface load
Value: 2Calculates Tm using GC content percentage:
  • More accurate than Wallace
  • Considers base composition
Value: 3Alternative GC-based calculation:
  • Different formula from Approx 2
  • May be more suitable for certain primer types
Value: 4Thermodynamic nearest-neighbor method:
  • Most accurate calculation
  • Considers base-pair stacking energies
  • Computationally more intensive

Changing the Method

1

Locate Radio Buttons

Find the Tm calculation method radio buttons below the download section
2

Select Method

Click on your preferred calculation method
3

Automatic Update

The Tm distribution plot automatically recalculates and updates (protege.py:748-800)
Try different methods to see how Tm estimates vary. The nearest neighbor method is generally most accurate but takes longer to compute for highly degenerate primers.

Understanding Tm Distribution

The melting temperature distribution plot helps evaluate primer compatibility.

Reading the Plot

The distribution plot (protege.py:752-800) shows:
  • Two curves: One for forward primer (blue/green), one for reverse primer (orange/red)
  • X-axis: Temperature in degrees Celsius
  • Y-axis: Probability density
  • Histogram bars: Show the frequency distribution of Tm values
  • Smooth curves: Normal distribution fits to the data

Calculation Process

For each selected primer pair (protege.py:760-778):
1

Extract Primer Sequences

Forward and reverse primer sequences are retrieved from click data
2

Calculate Degeneracies

The primerDeg() function generates all possible primer variants based on degenerate bases
3

Compute Tm Values

The selected Tm method calculates temperatures for all primer variants:
  • Wallace: TmWallace()
  • Approx 2: TmAp2()
  • Approx 3: TmAp3()
  • Nearest Neighbor: TmNN()
4

Generate Distribution

Plotly creates a distribution plot showing the range and frequency of Tm values

Interpreting Results

Good primer pairs show:
  • Overlapping Tm distributions (similar melting temperatures)
  • Narrow distributions (consistent Tm across degeneracies)
  • Peak Tm values within your desired range (typically 50-65°C)
Problematic pairs show:
  • Widely separated distributions (incompatible Tm values)
  • Very broad distributions (high variability due to degeneracies)
  • Extreme Tm values (too high or too low)
If no primers are selected, the plot shows placeholder data at 0°C (protege.py:789-797). Select both primers to see actual distributions.

Exporting Selected Primers

After selecting your primer pair, you can export the data for downstream use.

CSV Export Functionality

The “Download CSV” button (protege.py:817-823) exports the complete primer dataset.
1

Complete Your Selection

Select both forward and reverse primers to ensure you have recorded your choices
2

Click Download Button

Click the “Download CSV” button in the interface (protege.py:530)
3

Automatic Download

The callback function triggers the download (protege.py:805-823):
def func(n_clicks):
    return dcc.send_data_frame(phyloDF.to_csv, 'pd_protege_' + crrntTime + ".csv")
4

Save the File

The file is saved as pd_protege_YYYY-MM-DD_HHMM.csv with a timestamp

CSV File Contents

The CSV file contains the entire primer dataset, not just your selected primers. You’ll need to manually identify your selected primers based on their sequences or positions.
The exported CSV includes columns for:
  • Primer positions
  • Forward primer sequences
  • Reverse primer sequences
  • Degeneracies
  • Other calculated properties

Recording Your Selection

Since the CSV contains all primers, make note of your selected primers:
  1. Copy the primer sequences from the “You choose [FORWARD] --- [REVERSE]” display
  2. Note the positions and degeneracies shown in the click confirmations
  3. Search for these sequences in the downloaded CSV file
  4. Extract the relevant rows for your final primer pair
Consider taking a screenshot of the interface with your selections visible, or copy the primer sequences to a text file before downloading the CSV.

Complete Selection Workflow

Putting it all together, here’s the recommended workflow:
1

Launch the Interface

Access the web interface at http://127.0.0.1:8050 after running PROTÉGÉ PD
2

Select Forward Primer

Click a point in the main scatter plot to choose your forward primer
3

Select Reverse Primer

Click a point in the zoom plot to choose your reverse primer
4

Verify Primer Sequences

Check the primer pair display to confirm your selections
5

Choose Tm Method

Select your preferred Tm calculation method using the radio buttons
6

Evaluate Tm Distribution

Review the temperature distribution plot to ensure compatibility
7

Adjust if Needed

If the Tm distribution is unsatisfactory, select different primers and repeat
8

Record Selections

Copy the primer sequences or take a screenshot for your records
9

Export Data

Click “Download CSV” to save the complete primer dataset
The interface is fully reactive - all plots and displays update automatically as you make selections. No manual refresh is required.

Build docs developers (and LLMs) love