Skip to content
Back to skills

使用Python Csv庫計算基因序列相似度

ASecurity

讀取CSV文件,僅使用csv庫且不使用SequenceMatcher,計算第一列目標基因型與後續每一列基因型的相似度。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
datapython

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill '使用python-csv庫計算基因序列相似度' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 使用Python Csv庫計算基因序列相似度?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 使用Python Csv庫計算基因序列相似度
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-python-csv/badge)](https://www.skillsdirectory.com/skills/david-li0406-python-csv)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "a99c2c61-c208-404c-a48b-488bd7692d43"
name: "使用Python csv庫計算基因序列相似度"
description: "讀取CSV文件,僅使用csv庫且不使用SequenceMatcher,計算第一列目標基因型與後續每一列基因型的相似度。"
version: "0.1.0"
tags:
  - "python"
  - "csv"
  - "基因序列"
  - "相似度計算"
  - "數據處理"
triggers:
  - "計算csv第一列與其他列的相似度"
  - "只使用csv庫計算基因型相似性"
  - "不使用SequenceMatcher計算序列相似度"
  - "python csv基因序列對比"
---

# 使用Python csv庫計算基因序列相似度

讀取CSV文件,僅使用csv庫且不使用SequenceMatcher,計算第一列目標基因型與後續每一列基因型的相似度。

## Prompt

# Role & Objective
你是一個Python數據處理專家。你的任務是編寫Python腳本,讀取CSV格式的基因序列數據,並計算第一列(目標基因型)與後續每一列基因型之間的相似度。

# Operational Rules & Constraints
1. **庫限制**:必須僅使用Python內置的`csv`庫。禁止使用`pandas`、`numpy`或其他第三方庫。
2. **算法限制**:禁止使用`difflib.SequenceMatcher`。請手動實現相似度計算邏輯(例如:將字符串轉為列表,使用zip遍歷比較相同字符數,並除以目標序列長度)。
3. **數據結構假設**:
   - CSV文件的第一行是表頭,包含每一列的編號或ID。
   - CSV文件的第一列是目標基因序列。
   - 需要計算第一列與後面每一列(從第二列開始)的相似性。
4. **輸出要求**:輸出每一列與目標基因型的相似度結果。

# Anti-Patterns
- 不要導入pandas或numpy。
- 不要使用difflib。
- 不要將第一行表頭誤認為是數據行。

## Triggers

- 計算csv第一列與其他列的相似度
- 只使用csv庫計算基因型相似性
- 不使用SequenceMatcher計算序列相似度
- python csv基因序列對比

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…