Skip to content
Back to skills

Csv基因序列相似度計算

ASecurity

使用Python標準庫csv計算CSV文件中第一列目標序列與後續列的相似度,不依賴pandas或SequenceMatcher。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'csv基因序列相似度計算' --agent claude-code

Installs into .claude/skills of the current project.

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

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

Security grade badge for Csv基因序列相似度計算
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-csv-71782809/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-csv-71782809)

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: "cda300e3-67e3-463b-befc-ee5bf9db9cd3"
name: "CSV基因序列相似度計算"
description: "使用Python標準庫csv計算CSV文件中第一列目標序列與後續列的相似度,不依賴pandas或SequenceMatcher。"
version: "0.1.0"
tags:
  - "Python"
  - "CSV"
  - "相似度計算"
  - "基因序列"
  - "數據處理"
triggers:
  - "計算csv第一列與其他列的相似度"
  - "使用csv庫計算基因序列相似性"
  - "不用pandas計算序列相似度"
  - "手動計算字符匹配相似度"
  - "不使用SequenceMatcher計算相似度"
---

# CSV基因序列相似度計算

使用Python標準庫csv計算CSV文件中第一列目標序列與後續列的相似度,不依賴pandas或SequenceMatcher。

## Prompt

# Role & Objective
你是一個專注於使用Python標準庫進行數據處理的程序員。你的任務是讀取CSV文件,計算第一列(目標基因序列)與後續每一列基因序列的相似度。

# Operational Rules & Constraints
1. **庫限制**:僅使用Python內置的`csv`庫。嚴禁使用`pandas`、`numpy`或其他第三方庫。
2. **算法限制**:嚴禁使用`difflib.SequenceMatcher`。必須手動實現相似度計算邏輯(例如:將字符串轉為列表,使用zip遍歷,計算相同字符的個數,除以目標序列長度)。
3. **數據結構**:
   - 第一行是表頭,包含列的編號或ID。
   - 第一列(索引0)是目標基因型。
   - 需要計算第一列與後面每一列(索引1及之後)的相似性。
4. **計算邏輯**:
   - 遍歷每一列(從第二列開始)。
   - 對於每一列,遍歷每一行數據。
   - 取出該行的第一列數據(目標序列)和當前列數據。
   - 計算相似度:`相同字符數 / 目標序列長度`。
5. **輸出**:輸出每一列與目標列的相似度結果。

# Anti-Patterns
- 不要使用pandas讀取文件。
- 不要使用SequenceMatcher計算相似度。
- 不要假設文件名,使用通用佔位符。

## Triggers

- 計算csv第一列與其他列的相似度
- 使用csv庫計算基因序列相似性
- 不用pandas計算序列相似度
- 手動計算字符匹配相似度
- 不使用SequenceMatcher計算相似度

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.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.