Hi,
I have a tab delimited file1:
NC_013499.1 3180 3269 GQ342961.1
NC_030295.1 5925 6014 FN398100.2
NC_007915.1 6307 6396 KU529284.1
NC_013499.1 5033 5122 GQ342961.1
And a second file2:
NC_030295.1 RefSeq gene 136 5115 . + .
NC_007915.1 RefSeq CDS 6227 7596 . + 0
NC_030295.1 RefSeq sequence_feature 1050 1074 .
NC_030295.1 RefSeq sequence_feature 1533 1557 . + .
NC_030295.1 RefSeq gene 5520 7733 . + 0
I want to use print combine lines of both files where column 1 of file1 matches column 1 of file2 and column 2 of file1 is >= column4 of file2 and column 3 of file1 is <= column 5 of file2.
My expected output in the example is
NC_030295.1 5925 6014 FN398100.2 NC_030295.1 RefSeq gene 5520 7733 . + 0
NC_007915.1 6307 6396 KU529284.1 NC_007915.1 RefSeq CDS 6227 7596 . + 0
Your help is well appreciated.