I wanted to get the average of two columns and compare that average to a column in another file. I have the average in column 2 in in column 1 the chromosome number. If column 1 is the same for both files i want to calculate the difference between column 2 of two files as described above.
Sorry for all questions. im really new with this.
This is a very confusing explanation and seems that your original statement has nothing to do with the what're asking now and with the sample file you provided.
If the last statement is what you're after, please provide sample files and the desired output.
Also please show your own attempt at the resolution - it would help us guide you in the right direction.