AG
数据与复现
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extr…
FreedomIntelligence/OpenClaw-Medical-Skills查看
维护者 FreedomIntelligence · 最近更新 2026年4月1日
CRISPR editing: amplicon sequencing → CRISPResso2 → outcome analysis.
原始来源
https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/bio-workflows-crispr-editing-pipeline
技能摘要
原始文档
pip install crisprscan biopython pandas numpy matplotlib
conda install -c bioconda primer3-py cas-offinder
## Step 1: Guide RNA Design
```python
from Bio import SeqIO
from Bio.Seq import Seq
import pandas as pd
import re
def find_guides(sequence, pam='NGG'):
'''Find all potential gRNA target sites with NGG PAM.'''
guides = []
seq_str = str(sequence).upper()
# Forward strand: 20bp + NGG
for match in re.finditer(r'(?=([ATCG]{20}[ATCG]GG))', seq_str):
pos = match.start()
target = match.group(1)[:20]
pam_seq = match.group(1)[20:23]
guides.append({
'sequence': target,
'pam': pam_seq,
'position': pos,
'strand': '+',
'full_target': match.group(1)
})
# Reverse strand: CCN + 20bp
for match in re.finditer(r'(?=(CC[ATCG][ATCG]{20}))', seq_str):
pos = match.start()
full = match.group(1)
target = str(Seq(full[3:23]).reverse_complement())
pam_seq = str(Seq(full[0:3]).reverse_complement())
guides.append({
'sequence': target,
'pam': pam_seq,
'position': pos,
'strand': '-',
'full_target': full
})
return pd.DataFrame(guides)
def score_guide(guide_seq):
'''Score guide using Rule Set 2-like heuristics.'''
score = 0.5 # Base score
# GC content (optimal: 40-70%)
gc = (guide_seq.count('G') + guide_seq.count('C')) / len(guide_seq)
if 0.4 <= gc <= 0.7:
score += 0.2
elif gc < 0.3 or gc > 0.8:
score -= 0.2
# No poly-T (>4 T's is Pol III terminator)
if 'TTTT' in guide_seq:
score -= 0.3
# G at position 20 (adjacent to PAM) preferred
if guide_seq[-1] == 'G':
score += 0.1
# Avoid GG at positions 19-20
if guide_seq[-2:] == 'GG':
score -= 0.1
# Seed region (positions 12-20) GC
seed = guide_seq[11:20]
seed_gc = (seed.count('G') + seed.count('C')) / len(seed)
if 0.4 <= seed_gc <= 0.7:
score += 0.1
return min(1.0, max(0.0, score))
相关技能
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extr…
Access 20+ years of global financial data: equities, options, forex, crypto, commodities, economic indicators, and 50+ t…
Filter alignments by flag, quality, region, or paired status.
Index BAM/CRAM files with samtools index for random access.