Results 1 to 2 of 2
- 10-18-2012, 04:16 AM #1
Member
- Join Date
- Oct 2012
- Posts
- 1
- Rep Power
- 0
Find complete region between lines
Hi,
I have a file which looks like this:
chr1 20 100 0
chr1 50 250 1
chr1 70 500 4
chr1 100 250 1
chr1 500 800 0
chr2 50 80 2
chr2 70 100 3
chr2 159 800 0
And want to find the complete region between the zeros in column 4 for which the region contains a 4.
So for this example I want to get as output only:
chr1 50 250
because the first region between the zeros contained a 4 and the second region between the zeros didn't.
Because Im pretty new with java I have no idea how to do this.
First I wanted to put all regions between the zeros in an array and later look if there in a 4 in that array. If there is, return that array.
But I didn't know how to do this exactly
Could somebody help me?
Thanks!
- 10-24-2012, 11:39 PM #2
Similar Threads
-
Same keyword #region in C#
By hqt in forum New To JavaReplies: 3Last Post: 01-27-2012, 10:21 AM -
I need to truncate a file with 10 or more lines, to 10, removing the first lines
By sledjama in forum New To JavaReplies: 3Last Post: 10-25-2011, 06:29 PM -
Replace a region of an image
By alex88 in forum Java 2DReplies: 4Last Post: 06-04-2011, 05:21 PM -
cannot find symbol variable lines 24, 25, 44, 45, 63, 64? Help!
By ironman_777 in forum New To JavaReplies: 4Last Post: 12-25-2010, 01:17 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks