|
|
DDI.txt中内容如下,是我想要筛选的源文件。
drug1 id drug2 id
DB00005 DB01281
DB00005 DB00026
DB00005 DB08879
DB00005 DB06168
DB00005 DB08904
DB00005 DB00531
DB00005 DB06643
DB00005 DB00065
DB00005 DB01097
index.txt中内容如下:
drug id
DB00175
DB00177
DB00178
DB00190
DB00191
DB00193
DB00199
DB00201
DB00210
DB00222
DB00227
link.txt中则是drug id与stitch_id中 一 一对应关系:
CID000054687 DB00175
CID000060846 DB00177
CID005362129 DB00178
CID000034359 DB00190
CID000004771 DB00191
CID000033741 DB00193
CID000012560 DB00199
CID000002519 DB00201
CID000060164 DB00210
CID000003476 DB00222
希望依据index中所存在的196个drug id去筛选DDI.txt中的数据,当且仅当DDI.txt每一行中的drug1 id drug2 id都在index.txt中出现,该行才可被提取出来输入到out.txt中去,在输入到最终的out.txt之前希望根据link.txt中drug id与stitch_id中 一 一对应关系将筛选出来的DDI从drug id格式转化成stitch_id格式,结果大致应如下:
stitch1_id stitch2_id
CID000002118 CID000000896
CID000002249 CID000002162
CID000002315 CID000002249
CID000002481 CID000001983
CID000002540 CID000002162
CID000002576 CID000002244
CID000002712 CID000002160
CID000002732 CID000002249
望大神不吝赐教~~~ |
评分
-
查看全部评分
|