bio-primer-design-primer-basics
Design PCR primers for a target sequence using primer3-py. Specify target regions, product size, melting temperature, and other constraints. Returns ranked…
от FridrichMethod★ 17 звёзд на GitHub
Установить bio-primer-design-primer-basics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
PCR Primer Design
Design PCR primers using primer3-py, the Python binding for Primer3.
Required Imports
import primer3
from primer3 import p3helpers
from Bio import SeqIO
from Bio.Seq import Seq
Sequence Preparation (p3helpers)
# Sanitize sequence (uppercase, remove whitespace)
raw_seq = ' atgc gatc GATC '
clean_seq = p3helpers.sanitize_sequence(raw_seq)
print(f'Cleaned: {clean_seq}') # 'ATGCGATCGATC'
# Reverse complement for designing reverse primers
seq = 'ATGCGATCGATC'
rc_seq = p3helpers.reverse_complement(seq)
print(f'Reverse complement: {rc_seq}') # 'GATCGATCGCAT'
# Ensure valid DNA sequence (ACGT only, uppercase)
valid_seq = p3helpers.ensure_acgt_uppercase('atgcNNgatc') # Raises error if invalid
Basic Primer Design
sequence = 'ATGCGTACGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG'
result = primer3.design_primers(
seq_args={'SEQUENCE_TEMPLATE': sequence},
global_args={
'PRIMER_PRODUCT_SIZE_RANGE': 100, 300,
'PRIMER_MIN_TM': 57.0,
'PRIMER_OPT_TM': 60.0,
'PRIMER_MAX_TM': 63.0,
'PRIMER_MIN_GC': 40.0,
'PRIMER_MAX_GC': 60.0,
}
)
Extract Primer Results
num_returned = result['PRIMER_PAIR_NUM_RETURNED']
print(f'Found {num_returned} primer pairs')
for i in range(num_returned):
left = result[f'PRIMER_LEFT_{i}_SEQUENCE']
right = result[f'PRIMER_RIGHT_{i}_SEQUENCE']
left_tm = result[f'PRIMER_LEFT_{i}_TM']
right_tm = result[f'PRIMER_RIGHT_{i}_TM']
product_size = result[f'PRIMER_PAIR_{i}_PRODUCT_SIZE']
print(f'Pair {i}: {left} / {right}')
print(f' Tm: {left_tm:.1f}C / {right_tm:.1f}C, Product: {product_size}bp')
Target a Specific Region
# Target a specific region: [start, length]
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_TARGET': [100, 50], # Target region at position 100, length 50
},
global_args={
'PRIMER_PRODUCT_SIZE_RANGE': 150, 300,
'PRIMER_OPT_TM': 60.0,
}
)
Primers Must Span a Region
# Primers must span this region (e.g., exon junction)
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_INCLUDED_REGION': [50, 200], # Primers within this region
},
global_args={'PRIMER_PRODUCT_SIZE_RANGE': 100, 250}
)
Exclude Regions
# Exclude regions (e.g., SNP positions, repeats)
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_EXCLUDED_REGION': [[150, 20], [300, 15]], # Regions to avoid
},
global_args={'PRIMER_PRODUCT_SIZE_RANGE': 100, 300}
)
Constrain Primer Positions
# Force primer to overlap a specific position
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_FORCE_LEFT_START': 50, # Left primer must start here
'SEQUENCE_FORCE_RIGHT_START': 250, # Right primer must start here
},
global_args={'PRIMER_PRODUCT_SIZE_RANGE': 150, 250}
)
Design for Sequencing
# Single primer for sequencing
result = primer3.design_primers(
seq_args={'SEQUENCE_TEMPLATE': sequence},
global_args={
'PRIMER_PICK_LEFT_PRIMER': 1,
'PRIMER_PICK_RIGHT_PRIMER': 0, # Only design left primer
'PRIMER_PICK_INTERNAL_OLIGO': 0,
'PRIMER_OPT_SIZE': 20,
'PRIMER_MIN_SIZE': 18,
'PRIMER_MAX_SIZE': 25,
}
)
Full Parameter Control
result = primer3.design_primers(
seq_args={
'SEQUENCE_TEMPLATE': sequence,
'SEQUENCE_TARGET': [200, 50],
},
global_args={
'PRIMER_PRODUCT_SIZE_RANGE': [[150, 300], [300, 500]], # Multiple ranges
'PRIMER_NUM_RETURN': 5,
'PRIMER_MIN_SIZE': 18,
'PRIMER_OPT_SIZE': 20,
'PRIMER_MAX_SIZE': 25,
'PRIMER_MIN_TM': 57.0,
'PRIMER_OPT_TM': 60.0,
'PRIMER_MAX_TM': 63.0,
'PRIMER_MIN_GC': 40.0,
'PRIMER_OPT_GC_PERCENT': 50.0,
'PRIMER_MAX_GC': 60.0,
'PRIMER_MAX_POLY_X': 4, # Max consecutive identical bases
'PRIMER_MAX_NS_ACCEPTED': 0, # No ambiguous bases
'PRIMER_MAX_SELF_ANY': 8, # Self-complementarity
'PRIMER_MAX_SELF_END': 3, # 3' self-complementarity
'PRIMER_PAIR_MAX_COMPL_ANY': 8, # Pair complementarity
'PRIMER_PAIR_MAX_COMPL_END': 3, # Pair 3' complementarity
'PRIMER_MAX_END_STABILITY': 9.0, # Max 3' end stability (delta G)
}
)
Lo
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
read_file - 02
run_shell_command
Вложенные файлы
- examples/primer_design.py
- usage-guide.md
FAQ
Что делает скилл bio-primer-design-primer-basics?
Design PCR primers for a target sequence using primer3-py. Specify target regions, product size, melting temperature, and other constraints. Returns ranked primer pairs with quality metrics. Use when designing standard PCR primers.
Как установить скилл bio-primer-design-primer-basics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-primer-design-primer-basics запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…