With pick this is done as follows:
pick '#'Index1::BarcodeSequence Name::geneticSampleID < map.txt
a::b
is pick's way of computing new columns from old columns - in this case it is used in its simplest form to rename column a
to b
.
Pick is an expressive low-memory command-line tool for manipulating text file tables. It can also change columns, compute new columns from existing columns, filter rows and a lot more (e.g. read in a dictionary and map columns or filter rows using the dictionary).