in reply to continuuos intervals

thank you a lot,you are right!it is not so clear my explanation! so...the input file is composed by intervals of different lenght of piece of genes (the name is in the first column).I have to split these intervals in smaller intervals of 200, considering to "complete the gap" among the intervals. At the same time, the intervals have to be of 200 but the next start has to be 200+2. To make it easier.. this is an easier input file. The intervals I have to create is 10 input.txt gene1 chr1 10 25 gene1 chr1 46 99 gene1 chr1 103 190 gene2 chr4 50 63 gene2 chr4 90 110 output.txt gene1 chr1 10 20 gene1 chr1 22 53 gene1 chr1 55 65 gene1 chr1 67 77 gene1 chr1 79 89 gene1 chr1 91 99 gene2 chr4 50 60 gene2 chr4 62 99 gene2 chr4 101 110

Replies are listed 'Best First'.
Re^2: continuuos intervals
by perldigious (Priest) on Aug 31, 2016 at 14:40 UTC

    Hi mesana, just a few helpful new PerlMonks user tips.

    Please put separate <p> and <code> tags around your input and output data like you did in your original post. This helps the monks here quickly copy and paste your data if necessary.

    Please reply directly to a node you are responding to by clicking the individual "reply" button on that node. This helps keeps conversations organized and understandable.

    You can similarly "edit" any of your own nodes if you need to make fixes and updates, but it's considered courteous to include "UPDATE" or "EDIT" text when you do so explaining what you changed. If you intend to delete large portions this way, it's also nice to use <del> tags around the deleted portions instead so it appears like this. This also helps future readers in case you get responses discussing things you have deleted.

    A quick and helpful PerlMonks tutorial for other basic things can be found in How do I post a question effectively?

    I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
    I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious