Change sample-ids after running dada2

Hello @ju4n_dc!

:scream: :scream: :scream:

Luckily, I have just the trick for you! Take a look at feature-table group! That might sound weird at first, but, stick with me. What you can do is add a new column to your metadata file that contains the new sample IDs. Then, when you run the group command, point the --m-metadata-column to the column containing your new sample IDs. The --p-mode parameter don't matter (you can pick whatever you want) - because you are "grouping" the values into the same "groups", just with new names, none of the abundances will change. Et voila! Moving forward, just drop the old sample ID column from your metadata and replace it with the new sample ID column. :recycle:

Fortunately you don't need to do anything here - this file contains FeatureData, and is blissfully unaware of any sample-id SNAFUs that might be lurking in your feature table.

Good luck and keep us posted! :t_rex:

14 Likes