perishky/meffil

Checks for sample swap detection

Closed this issue · 1 comments

Hi!
I detected some SNP discordances between my methylation and genotype arrays. I am trying to rematch those swaps. Using the below function, I obtained the genotype corresponding to the 65 probes used to test the discordance. I get the data per SNP (0, 1,2), but I don't know which allele they correspond to. How could I get this info?

snp.betas <- meffil.snp.betas(qc.objects)
genotypes <- meffil:::calculate.beta.genotypes(snp.betas)

Thanks in advance!

Apologies for the slow response. I somehow missed this one.

The code doesn't actually "know" which is allele is which. It is just using clustering to assign beta values to 0/1/2. When meffil.snp.concordance() calculates concordance with genotype data, 0 and 2 are assigned to the allele in the genotype data that maximizes concordance. This is based on the assumption that most of your samples will not be mismatched.