Well... actually my guess in the last post is correct, and I just verified it form my code. For the previous miscommunication, I should have clearly in each post indicated that THE ALLELE NAME IN MY BIFILE IS EXACTLY THAT IN THE SCOREFILE.
For people who may have the same silly problem as me, I straightforwardly give the answer here.
Suppose your ScoreFile has 1 line,
rsID effect_allele beta
1:2245570 G -0.0276009
your GenotypingData.bim has a corresponding line ( ignore the ambiguous strands problem here)
1 1:2245570 2245570 G C
Therefore the ref allele (major allele) is the effect allele.
Suppose you have a patient with FID 16214852, in the result PLINK.PROFILE file, you find the result
16214852 16214852 -9 2 0 0
CNT2 = 0 AND the score = 0.
Now we try to figure out how Plink get the result. Let's recode the BFILES to .raw file, and we extract the dosage of patient 16214852 and the corresponding dosage of 1:2245570. I use awk to do that, and you can use R or cpp. The result is
Therefore, the dosage of the effect allele G = 0, that is why CNT2 = 0. So in human easy-understanding language, CNT2 = SUM OF DOSAGE(EFFECT ALLELE).
To be honest, I would like to know why in Plink help of Allelic scoring, the term of "effect allele" is not explicitly mentioned. Hope can be more friendly to very beginning users.