I have a question regarding the annotation of GWAS results.
Here are the sample files
File1 Below is File1 with the HG38id column name that contains chromosome number and base pair position.
HG38id 13:21325916 5:128327887 19:44906745 1:88820990 17:44981703
File2 Below is File2 with the HG38id column name that contains chromosome number and base pair position.
HG38id 13:21325516 5:128327100 19:44906111 1:88820200 17:44981903
I would like to know the ways to check the nearest base pair position between File1 and File2. For instance, 500 base pairs downstream and upstream.
The output for above given File1 and File2 with 500 base pair downstream and the upstream is
because these two base pair positions are nearby 500 bases in both files.
What is the way to find the nearest base pair positions (for instance, 500 or 200 base pairs downstream and upstream) in large files?
Thanks in advance