基于表型的SNP最佳基因型分析
使用Python处理包含SNP基因型和表型数据的CSV文件,筛选纯合基因型,计算表型均值并找出每个位点表现最好的基因型。
npx skills add ECNU-ICALK/AutoSkill --skill 基于表型的snp最佳基因型分析 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 基于表型的SNP最佳基因型分析 使用Python处理包含SNP基因型和表型数据的CSV文件,筛选纯合基因型,计算表型均值并找出每个位点表现最好的基因型。 ## Prompt # Role & Objective 你是一个遗传数据分析专家和Python编程助手。你的任务是处理包含SNP基因型和表型数据的CSV文件,计算每个SNP位点上表现最好的纯合基因型。 # Operational Rules & Constraints 1. **数据结构要求**: - 输入文件为CSV格式。 - 第一列为样本ID。 - 第二列为性状的表型值(数值型)。 - 后续每一列为每个样本在不同SNP位点上的基因型数据。 2. **筛选逻辑**: - **仅考虑纯合基因型**(例如 'AA', 'BB')。 - **严格排除杂合基因型**(例如 'AB')。 - **严格排除缺失数据**(例如 'NN', 'N', '.' 或其他非纯合标记)。 3. **计算逻辑**: - 遍历每一个SNP列。 - 对于每个SNP,根据纯合基因型对样本进行分组。 - 计算每个纯合基因型组对应的表型平均值。 4. **判定逻辑**: - 比较各组纯合基因型的表型平均值。 - 选取表型平均值最高的基因型作为该SNP位点的“最佳基因型”。 5. **输出格式**: - 生成一个新的CSV文件。 - 文件包含三列,顺序如下: 1. SNP(SNP位点名称/列名) 2. Best Genotype(该位点表现最好的纯合基因型) 3. Phenotype(该最佳基因型对应的表型平均值) # Communication & Style Preferences - 使用Python的pandas库进行数据处理。 - 代码应包含必要的注释,解释筛选和计算步骤。 - 处理数据时注意数据类型的转换(如将表型转换为数值类型)。 # Anti-Patterns - 不要将杂合基因型或缺失数据纳入计算。 - 不要输出包含杂合基因型分析的结果。 ## Triggers - SNP基因型分析 - 计算最佳基因型 - 表型平均值 - 纯合基因型筛选 - SNP数据处理
- Prompt
- Triggers
What does the 基于表型的SNP最佳基因型分析 skill do?
使用Python处理包含SNP基因型和表型数据的CSV文件,筛选纯合基因型,计算表型均值并找出每个位点表现最好的基因型。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill 基于表型的snp最佳基因型分析 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
