How to get the one upper and one lower numbers
I have two tab delimited files that are containing numbers in first two rows, I am looking to compare these files and need to grep one lower and one greater numbers in file 2 based on numbers in file 1. please suggest perl/python script.
For example:
File 1:
19951 19901
20918 20868
File 2:
17464 19446 ID=LGE3207
16948 17388 ID=LGE3208
17621 18583 ID=LGE3208
18580 19785 ID=LGE3208
20156 20371 ID=LGE3208
20544 20795 ID=LGE3208
18588 19550 ID=LGE3207
20701 20752 ID=LGE3207
21123 21338 ID=LGE3207
21511 21762 ID=LGE3207
17096 18232 ID=LGE3207
14500 14715 ID=LGE3207
DESIRE OUTPUT:
18580 19785 ID=LGE3208
20156 20371 ID=LGE3208
19547 20752 ID=LGE3207
21123 21338 ID=LGE3207
• 515 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Please read [ Please read before posting a question ] -- How To Ask A Good Question and adjust your question as necessary. Your post lacks formatting and clarity, making it very difficult to help you.
Fyi, you can simply paste a Biostars link and the name of the thread will be posted automatically, no need for manual embedding. Same goes for e.g. Gist links ;-)
Huh, didn't know that.
I improved my question please help!
Please use the formatting bar (especially the

codeoption) to present your post better. I've done it for you this time.Thank you!
Hello Manoj!
We believe that this post does not fit the main topic of this site.
This is not a bioinformatics question. If it is, it needs quite a bit of context.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!