基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill evolution命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | evolution |
| description | Study of biological evolution, natural selection, speciation, and phylogenetics |
| category | biology |
| keywords | ["evolution","natural selection","phylogenetics","speciation","adaptation","evolutionary biology"] |
Evolutionary biology studies the origin and descent of species, natural selection, and the processes that generate biological diversity. I cover natural selection, genetic drift, gene flow, mutation, speciation, phylogenetics, and evolutionary genetics. I help analyze phylogenetic relationships, calculate selection pressures, and understand adaptation.
import numpy as np
from typing import List, Dict, Tuple
from collections import Counter
class NaturalSelection:
def __init__(self, species: str):
self.species = species
def calculate_fitness(self, phenotype_value: float,
optimum: float,
omega: float) -> float:
return np.exp(-0.5 * ((phenotype_value - optimum) / omega)**2)
def directional_selection_gradient(self, mean_phenotype: float,
optimum: float,
heritability: float,
selection_strength: float) -> float:
return heritability * selection_strength * (optimum - mean_phenotype)
def calculate_response_to_selection(self, s: float,
h2: float) -> float:
R = s * h2 # Breeder's equation
return R
def equilibrium_allele_frequency(self, s: ,
h: ) -> :
s / (s + h * s)
() -> :
selection_coefficient == :
initial_freq
s = selection_coefficient
N = population_size
( - np.exp(- * s * N * initial_freq)) / \
( - np.exp(- * s * N))
:
():
.alignment_file = alignment_file
() -> :
mismatches = ( a, b (seq1, seq2) a != b)
mismatches / (seq1)
() -> :
K = - * np.log( - *P - Q) - * np.log( - *Q)
P = transitions / sites
Q = transversions / sites
K
() -> :
clusters = {i: [i] i ((distances))}
current_distances = distances.copy()
tree = {}
(clusters) > :
min_pair = (current_distances.keys(),
key= x: current_distances[x])
cluster1, cluster2 = min_pair
distance = current_distances[min_pair]
new_cluster =
tree[new_cluster] = {
: [cluster1, cluster2],
: distance /
}
clusters[new_cluster] = clusters[cluster1] + clusters[cluster2]
clusters[cluster1]
clusters[cluster2]
tree
() -> :
d / ( * mutation_rate)
() -> :
lr = * (alt_likelihood - null_likelihood)
df =
p_value = - stats.chi2.cdf(lr, df)
{: lr, : p_value}
:
():
.gene_name = gene_name
() -> :
dn / ds ds > ()
() -> :
codon_table = {
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , : ,
: , : , : , :
}
syn_sites =
i (, (sequence), ):
codon = sequence[i:i+]
(codon) == :
syn_sites += codon_table.get(codon, )
syn_sites
() -> :
omega > :
omega < :
selection = NaturalSelection()
fitness = selection.calculate_fitness(, optimum=, omega=)
()
phylo = Phylogenetics()
dist = phylo.calculate_pairwise_distance(, )
()