I tried to search the forum exhaustively for related topics, so I hope that this is a new and useful question.
I have an OTU table in which each OTU is named with a sha1 label from an earlier step in my pipeline. I also generated a tab-separated taxonomy table using sequences associated with these OTUs. The taxonomy table contains a column with with sha1 labels and a column with species names, but it also contains taxa that didn't make into my final OTU table. Thus, there is not a 1 for 1 relationship between the number of OTUs in my OTU table and the number of taxa in the taxonomy table. I would like to rename the OTU IDs in my OTU table with the corresponding species names in the taxonomy table.
My OTU table is currently formatted:
OTU_ID Sample1 Sample2 Sample3 56e3db633d31500040d8f4ab17085d5d174bf232 400 75 250 f1359a957a52091b3df7fa4612cfbd6d9472bfa4 100 200 999 b3f67fe2d59fe1e9808743bf8e645e5186c01956 25 300 750
My taxonomy table is formatted:
qseqid sseqid ssciname 2dd3bf79b7c187b598a007636b3727023d535e59 LC203322.1 Melanomma pulvis-pyrius 56e3db633d31500040d8f4ab17085d5d174bf232 LC015712.1 uncultured Eutypa c7cfee1d916e081d649ea8223ebac11dbb6ba829 JF908413.1 Mycena maurella f1359a957a52091b3df7fa4612cfbd6d9472bfa4 KP891143.1 uncultured fungus 195f508548eed794556049771e3eeaeabfd1992b JF908387.1 Mycena pseudocorticola b3f67fe2d59fe1e9808743bf8e645e5186c01956 LT906565.1 Fomitopsis pinicola
I would like my OTU table to look like:
OTU_ID Sample1 Sample2 Sample3 uncultured Eutypa 400 75 250 uncultured fungus 100 200 999 Fomitopsis pinicola 25 300 750