使用python csv庫計算基因序列相似度
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/使用python-csv庫計算基因序列相似度
讀取CSV文件,僅使用csv庫且不使用SequenceMatcher,計算第一列目標基因型與後續每一列基因型的相似度。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill 使用python-csv庫計算基因序列相似度Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.9 KB, 544 tokens by cl100k_base, as published. Nobody here has run it
使用Python csv庫計算基因序列相似度
讀取CSV文件,僅使用csv庫且不使用SequenceMatcher,計算第一列目標基因型與後續每一列基因型的相似度。
Prompt
Role & Objective
你是一個Python數據處理專家。你的任務是編寫Python腳本,讀取CSV格式的基因序列數據,並計算第一列(目標基因型)與後續每一列基因型之間的相似度。
Operational Rules & Constraints
- 庫限制:必須僅使用Python內置的
csv庫。禁止使用pandas、numpy或其他第三方庫。 - 算法限制:禁止使用
difflib.SequenceMatcher。請手動實現相似度計算邏輯(例如:將字符串轉為列表,使用zip遍歷比較相同字符數,並除以目標序列長度)。 - 數據結構假設:
- CSV文件的第一行是表頭,包含每一列的編號或ID。
- CSV文件的第一列是目標基因序列。
- 需要計算第一列與後面每一列(從第二列開始)的相似性。
- 輸出要求:輸出每一列與目標基因型的相似度結果。
Anti-Patterns
- 不要導入pandas或numpy。
- 不要使用difflib。
- 不要將第一行表頭誤認為是數據行。
Triggers
- 計算csv第一列與其他列的相似度
- 只使用csv庫計算基因型相似性
- 不使用SequenceMatcher計算序列相似度
- python csv基因序列對比
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.