Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- acc_number taxi
- YP_001378452 2345
- YP_001650052 5678
- YP_009446812 5435
- YP_002192894 7890
- Nothing cluster species target score
- 7101 cluster_000001 species1 YP_001378452.1 31.7
- 50457 cluster_000001 species2 YP_001650052.1 27.9
- 48798 cluster_000001 species3 YP_002192894.1 34.5
- 8514 cluster_000001 species4 YP_009446812.1 28.9
- TAXID=pd.read_table("/pathtoTAXID.txt",header=0)
- blast=pd.read_table("/pathtoblast.txt",header=0)
- for i in blast["target"]:
- if i in TAXID["acc_number"] without .1:
- add TAXID[taxi] in the line of the blast
- for i in blast["target"]:
- print(TAXID.loc[TAXID["Acc_number"] == i.split('.')[0]][1])
- df2['taxi']=df2.target.str.split(".").str[0].map(dict(zip(df1.acc_number,df1.taxi)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement