import pandas as pd
df = pd.read_csv("labuladuo_loci.txt")
quanshe = pd.read_table("北京犬舍.vcf")
loci_list = quanshe['ID'].values.tolist()
vareity_list = quanshe.columns.tolist()
score = {}
for variety in variety_list:
score[variety] = 0
quanshe.set_index(["ID"], inplace=True)
df.set_index(["ID"], inplace=True)
vareity_list.pop(2)
for locus in loci_list:
for variety in vareity_list:
if(quanshe.loc[locus,variety]==df.loc[locus,"ID"]):
score[variety] = score[variety] + 1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)