arrange in increasing order
Hi
i have a sequence which has 30000 strings which looks like this >string2791 280460 >string654 770561 >string2038 373997 >string8551 15386 >string4098 177229 >string3049 255838 >string8 672382 >string1358 507255 >string1115 578415 i want it to be arranged in order of incremental >string8 672382 >string654 770561 >string1115 578415 >string1358 507255 >string2038 373997 >string2791 280460 >string3049 255838 >string4098 177229 >string8551 15386 I want to basically know the lowest value in the whole sequence and the highest sequences. Please help. Thanks Sonia |
Is ">string" the real and unique string in the first field of the file? If it is, a simple
Code:
sort -k1.8n file |
Thanks for the quick help.The >string" is a unique string in the first field of the file.
i tried that code but its giving me a sequence like this >string21099 1028 >string21199 1020 >string21299 1013 >string21399 1007 >string21499 1001 >string1 3094459 >string9 2265554 >string8 2287989 >string7 23658 they are getting arranged in incremental order but in sets. Is there anything we could try? Thanks. |
Quote:
Code:
$ cat > file |
The cat command takes a long time to work in my system....
may be becoz my sequence is pretty big.I have 21513 sequences of this format. May be its that reason that its doing sorting in block? I am not sure,i could be completely wrong. but i use the following command : sort -k1.8n reads_original.txt >reads_new.txt |
I tested it on a file with 21513 sequences and it works as expected. Trying to figure out what's going on, please can you test this awk code to see if it makes a correct sorting?
Code:
awk ' |
All times are GMT -5. The time now is 05:19 PM. |