oxydeepu has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Compare elements of a line in a file
by frozenwithjoy (Priest) on Sep 13, 2012 at 07:55 UTC | |
by oxydeepu (Novice) on Sep 13, 2012 at 08:21 UTC | |
by frozenwithjoy (Priest) on Sep 13, 2012 at 08:32 UTC | |
by oxydeepu (Novice) on Sep 13, 2012 at 08:35 UTC | |
by oxydeepu (Novice) on Sep 13, 2012 at 08:38 UTC | |
by frozenwithjoy (Priest) on Sep 13, 2012 at 08:45 UTC | |
| |
|
Re: Compare elements of a line in a file
by davido (Cardinal) on Sep 13, 2012 at 07:55 UTC | |
by oxydeepu (Novice) on Sep 13, 2012 at 08:24 UTC |