Hi
I need a small help with a script. i have a file in the given format it is tab-seperated file
id orient co-ordinates
Contig0 + 109027 162520 184045 324019 375437
Contig0 - 165846 193861 243737 243740 243741 395893
Contig1 + 126334 145895 150562
Contig1 - 126804 152668 152671 152672 152673
Contig10 + 1069 126046 126047 126048
Contig10 - 281973 83318 83395
Contig100 + 249511 249557 51059
Contig100 - 161016 161020 245920
Contig10003 + 17593 17594
Contig1001 + 15558 15559 55338 55345 92236
So i need to compare the co-ordinates for a particular id on particular orientation and filter out co-ordiantes which are within 50 bases and keep the smallest co-ordiante amongst them. Basically comparison linewise
eg:
Contig10 + 1069 126046 126047 126048
Contig1001 + 15558 15559 55338 55345 92236
output :
Contig10 + 1069 126046
Contig1001 + 15558 55338 92236
I hope I explained it properly.
Can you please help me with this problem.
Thank you in advance
Best
Deepak
In reply to Compare elements of a line in a file by oxydeepu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |