I've recently started using Awk commands as i need it to pull information out of a file and give me the mean value of a series of numbers. Here is the code i run on my Infile and it works just fine.
Apologies, ive been looking at this for so long, i forget that its actually not that clear.
The original file that i am working with looks somthing like this
In the first colum is DNA sequence data for Mam189, Mam82 and Mam426 that i am comparing to other sequence data, listed in the second colum. The thrid colum is the sequence similarity between the data listed in colum 1 and colum 2.
The code above essentially takes everything that Mam189 is compared to and gives an average of the third colum. The output would read
I would like to be able to feed in a list of names, so that the code would be able to iterate over a list and give the average for Mam189, Mam82, Mam426.
I've only had experience using a for loop before, but it wont work in this case. Not sure what the best approach is to deal with this.