zhilizheng / SBayesRC

GNU General Public License v3.0
22 stars 2 forks source link

Small bug when testing for consistent alleles? #34

Closed dougspeed closed 1 week ago

dougspeed commented 3 weeks ago

SBayesRC was generally very easy to use (thanks).

However, I think there was a small error with Step 1, when testing for consistent alleles (basically, if gave an error if a snp had alleles A and B in bim file, but B and A in the .ma file). I think it is due to this line in LD.R

bA1A1 = (bims_val$V5 == ma_val$A1) & (bims_val$V6 == ma_val$A2)
bA1A2 = (bims_val$V6 == ma_val$A2) & (bims_val$V5 == ma_val$A1)

I think these two lines say the same, whereas they should instead be (for example)

bA1A1 = (bims_val$V5 == ma_val$A1) & (bims_val$V6 == ma_val$A2)
bA1A2 = (bims_val$V5 == ma_val$A2) & (bims_val$V6 == ma_val$A1)

I did not get problems later on, making me think it only affected Step 1

Thanks Doug

zhilizheng commented 2 weeks ago

Hi @dougspeed ,

Many thanks for suggetions. You are right, I didn't make this right here. I will fix the issue soon.

Regards, Zhili