I guess Easiest way is to show you what my data looks like in simpler way bp = basepair I have data of different chromosomes with start and end point of cluster tags in each of chromosomes it looks like :
columns = 1: chr 2: start 3:end 4: info(X) 5: info(X) 6:strand chr1 101 105 X X - chr1 102 108 X X - chr1 106 111 X X - chr1 112 113 X X - chr1 113 115 X X - chr2 114 118 X X - chr2 119 121 X X - chr2 120 123 X X - chr3 125 130 X X - chr3 131 132 X X - I need column 1 - 2 -3 - 6 I want to count the overlappes with 2 basepair overlappes for each cor +dinates in each chromosome and give ID number for those over laps tog +ether like in chr1 there are 4 cordinates and 3 of them have overlapp +ed except the last cordinate : so I will need to first count those 3 ove +rlappes and give them ID_1 then ID_2 will give to last cordinate in chr1 which + is not have overlapped with others . then Counting is became zero for the chr2 and check inside the chr2 co +rdinates for overlap and give ID from ID_1 for chr2 again and countin +g and so on for all chromosomes and give the out put like this : TSSD_ID chr start end strand count ID_1 1 101 111 - 3 ID_2 1 112 113 - 1 ID_3 1 113 115 - 1 ID_1 2 114 118 - 1 ID_2 2 119 123 - 2 ID_1 3 125 132 - 1
this the output I want to get but Mine is not working well !

In reply to Re^2: Help the counting! by g-alone
in thread Help the counting! by g-alone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.