hello!
thanks for all the replies! :D
To Almut:
Actually, judging from what almut said...It may be kind of impossible to generate a script that is able to differentiate which columns have frequencies of 0...
Because the input file is actually like that:
L122Q 40 97.56097561
V100I 15 36.58536585
T373I 10 24.3902439
V217I 4 9.756097561
G16D 3 7.317073171
L283P 3 7.317073171
D21N 2 4.87804878
S450N 2 4.87804878
D53E 2 4.87804878
I109V 2 4.87804878
R236K 2 4.87804878
K351R 2 4.87804878
K470R 2 4.87804878
K400R 2 4.87804878
I61L 2 4.87804878
V425I 2 4.87804878
N309T 2 4.87804878
M105V 2 4.87804878
K452R 2 4.87804878
E372D 2 4.87804878
L456V 2 4.87804878
M191L 2 4.87804878
A190V 2 4.87804878
V444I 2 4.87804878
V313Y 2 4.87804878
T373A 2 4.87804878
M316I 2 4.87804878
S498N 2 4.87804878
R293K 2 4.87804878
N433T 2 4.87804878
(this is only 1 little portion)
The system won't really know where each month start or ends right? ): So it also won't know when the frequency for each is 0...
...How about if I use separate files instead? Maybe 1 file for each month? Would it be possible to achieve my goal this way?
Sorry for the pestering and I really appreciate you pointing out the fatal error in my question! :))
To Spazm:
1. I have given a sample of the data file already, thanks for taking the effort to really help me look at my script...although what I'm asking for is a bit illogical ):
2. $freq represents the middle number in my data file...I'm still a newbie at this, so I may actually have a lot of extra steps that do not contribute to anything, but I don't really know how to make them more concise
3. When the occurrence rate is zero, it just doesn't appear in the data file...
4. My grep is to get values larger than 10, because I'm only looking at keys which have an occurrence rate of above 10 for any months
5. Thanks a lot for this helpful input! :D I was wondering why the sort function no longer worked after I changed it into an array. This is really useful! :)
Many thanks for helping me look at my script, I hope it'll start working too! :))
Best Regards,
Buzzybee |