Hi,
I have the following files.
cat 1.txt
cat 2.txt
output.txt
The logic is as follows....
chr1 in column1 of file1 should be matched to chr1 in column1 of file2.
Any value that is equal or 300 plus/minus range of the value in column2 of file1 matches to column2 of file2, (i.e., if column2 of file1 is 500, then the value in column2 of file2 can be 500, or between 200 and 500, or between 500 and 800) they should be printed.
Any value that is equal or 300 plus/minus range of the value in column3 of file1 matches to column3 of file2, (i.e., if column3 of file1 is 800, then the value in column3 of file2 can be 800, or between 500 and 800, or between 800 and 1100) they should be printed.
Also, anything that is in the range of column2 and column3 should be printed.
Ex: If file 1 has this record chr2 300 400, and file2 has this record chr1 301 383, both of them should be printed.
Each record is matched to each record in both these files.
I am looking for something that can be used across multiple files that are more than two.
Thanks a ton in advance. I know it is a pain. But, please help me.
---------- Post updated 02-09-12 at 09:59 AM ---------- Previous update was 02-08-12 at 02:18 PM ----------
Please guys. Someone help me out. :(:(:(:(:(:(:(
---------- Post updated at 04:19 PM ---------- Previous update was at 09:59 AM ----------
Any thoughts by anyone?
---------- Post updated at 04:20 PM ---------- Previous update was at 04:19 PM ----------
Any thoughts by anyone?