I have a tab-delimited textfile A (representing a BLAST output)
Name1 BBBBBBBBBBBB 99.40 166 1 0 1 166 334 499 3e-82 302
Name2 DDDDDDDDDDDD 98.80 167 2 0 1 167 346 512 4e-81 298
and a textfile B (representing a phylogenetic dendrogram) looking like
"Cluster A": {
"member": {
"Cluster A": "BBBBBBBBBBBB This is Animal A",
},
"name": "Cluster A"
},
"Cluster B: {
"member": {
"Cluster B": "DDDDDDDDDDDD This is Animal B"
},
"name": "cluster B"
}
I want to take the string found in the 2nd tab of textfile A (DDDDDDDDDDDD for example) and look it up in text file B. The script should then add the info found in textfile B into a new tab of textfile A :
Name1 BBBBBBBBBBBB 99.40 166 1 0 1 166 334 499 3e-82 302 Cluster A This is Animal A
Name2 DDDDDDDDDDDD 98.80 167 2 0 1 167 346 512 4e-81 298 Cluster B This is Animal B
Thank you very much!