TSSD_ID Chr Start End Count
+ Strand
ID_1 chr21 9417056 9417076 1 -
ID_2 chr21 9417667 9417687 1 -
ID_3 chr21 9512082 9512102 2 -
ID_3 chr21 9512082 9512102 2 -
ID_5 chr21 9535321 9535341 1 -
ID_6 chr21 9540527 9540547 1 -
ID_7 chr21 9544899 9544919 1 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_8 chr21 9564970 9564990 48 -
ID_56 chr21 9575389 9575409 1 -
ID_57 chr21 9652071 9652091 1 -
ID_58 chr21 9671166 9671186 3 -
ID_58 chr21 9671166 9671186 3 -
ID_58 chr21 9671166 9671186 3 -
ID_61 chr21 9700592 9700612 1 -
ID_62 chr21 9704082 9704102 1 -
ID_63 chr21 9705333 9705353 1 -
if you look at the first column the ID number is jumping from 2 to 5 and from 8 to 52
as you see it adds the counting the column 5 to the ID ! but I dont want it to do that !
I want to add +1 to ID number when the entries in column three (start column) for example 1st entry - 2nd entry > 2 and add +1 to column5 when 1st entry - 2nd entry < 2 (in column 3 (start) )
I mean for entry and the next entry
and give me unique output instead of printing for many times like :
TSSD_ID Chr Start End Count
+ Strand
ID_1 chr21 9417056 9417076 1 -
ID_2 chr21 9417667 9417687 1 -
ID_3 chr21 9512081 9512102 1 -
ID_3 chr21 9512082 9512102 3 -
ID_3 chr21 9512083 9512104 1 -
ID_3 chr21 9512085 9512120 1 -
ID_5 chr21 9535321 9535341 1 -
ID_6 chr21 9540527 9540547 1 -
ID_7 chr21 9544899 9544919 1 -
ID_8 chr21 9564970 9564990 1 -
ID_8 chr21 9564975 9564993 2 -
ID_9 chr21 9564970 9564990 8 -
ID_10 chr21 9564970 9564990 4 -
ID_11 chr21 9564970 9564990 7 -
as you see in ID_3 in one line count is 3 which I means at that position there are three identical clusters
again in ID_3 there are some with counting 1 which are in that area and covered in 2bp but are not same
like this :
|=====|
|=====| there are identical in ID_3 and count as 3
|=====|
|=====|
|=====| and these two are again
in ID_3 but there are not
Identical so they have different
counting as each of them count as one!
and
when
|=====|
|=====| they do not have 2bp overlap
the ID will change to ID_4
as you see in ID_3 all of them had 2bp overlapped
|