拟解决问题-对BSA返回结果数据进行筛选获得候选基因
BSA返回的测序文件,将两个文件的SNPindex值与基因注释结合起来,这样就能直接使用Excel的筛选功能找到候选基因ID。两个.xlsx文件,比如Delta-SNPindex.xlsx和exonic_variant_function.xlsx
pd.merge(df1, df2, how = ‘inner’, on = [‘col1’, ’col2’ ‘col3’], indicator = True )
使用代码如下
该处使用的url网络请求的数据
import pandas as pd
#导入excel文件
filepath1 = "E:\yB\Delta_SNPindex.xlsx"
filepath2 = "E:\yB\exonic_variant_function.xlsx"
df1 = pd.read_excel(filepath1