我有两个(相当大,约15k行)csv表,格式如下:
Disease/Trait Mapped_gene p-Value
Wegener's granulomatosis HLA-DPB1 2.00E-50
Wegener's granulomatosis TENM3 - DCTD 2.00E-06
Brugada syndrome SCN5A 1.00E-14
Brugada syndrome SCN10A 1.00E-68
Brugada syndrome HEY2 - NCOA7 5.00E-17
Major depressive disorder IRF8 - FENDRR 3.00E-07
Identifier Homologues Symbol
CG11621 5286 HEY2
CG11621 5287 IRF8
CG11621 5287 PIK3C2B
CG11621 5288 PIK3C2G
CG11621 5288 PIK3C2G
CG11949 2035 DCTD
CG11949 2035 EPB41
CG11949 2036 EPB41L1
CG11949 2037 EPB41L2
我想使用Python比较表,这样如果表2中的“Symbol”列与表1中的“Mapped_gene”匹配,则每个表中匹配的行可以合并在一起并放入一个输出文件中。在
我尝试过使用Pandas插件,但无法正常工作。有人有更好的主意吗?在
谢谢。在
这应该如您所愿:
它假设
Mapped_gene
下的每个基因名都是唯一的。它可以很容易地扩展以处理重复项,否则。在相关问题 更多 >
编程相关推荐