how to start writing code for such problems ??
input_file1:
a 1 33
a 34 67
a 68 78
b 1 99
b 100 140
c 1 70
c 71 100
c 101 190
input_file2:
a 5 23
a 30 72
a 76 78
b 5 30
c 23 88
c 92 98
I want to compare these two files such that for every value of a in file2 the two integers (boundary) fall in the range (boundaries) of a in file1 or between two ranges.
• 1,303 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Hello rakesh.xavierite!
We believe that this post does not fit the main topic of this site.
This doesn't seem relevant to bioinformatics. If you can give us more context, that could change this notion. I also don't understand the question as stated.
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!
A word of advice: The most important task is not to start hacking some spaghetti code immediately, but to understand and specify the problem correctly; then with the proper formalization find existing algorithms; developing a new algorithm or implementation is only the last resort.
With a proper specification, you might find that your problem can be described as finding overlap of integer intervals or range overlap. Both problems have been discussed sufficiently on BioStar and SO; for this reason the question will remain closed even if it should turn out to be related to bioinformatics.
https://www.google.no/search?q=overlap+of+integer+interval