Results 1 to 2 of 2
  1. #1
    Myrte88 is offline Member
    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    Default 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!

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: Find complete region between lines

    Is this pixel data or what? Can you describe that the input represents?

Similar Threads

  1. Same keyword #region in C#
    By hqt in forum New To Java
    Replies: 3
    Last Post: 01-27-2012, 10:21 AM
  2. Replies: 3
    Last Post: 10-25-2011, 06:29 PM
  3. Replace a region of an image
    By alex88 in forum Java 2D
    Replies: 4
    Last Post: 06-04-2011, 05:21 PM
  4. Replies: 4
    Last Post: 12-25-2010, 01:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •