Skip to content

Correcting wrong reference alleles #556

@marta-krych

Description

@marta-krych

Hello Florian,

after importing PLINK files into R as a bigSNP object, I noticed that the reference alleles for all SNPs are inverted. To obtain the correct values, I should invert the 0s with the 2s within the genotype matrix, and additionally I should (probably) swap allele1 with allele2 for consistency. However, after trying different approaches, I haven't found a straightforward and memory-efficient way to handle this problem. Is there a way to effectively correct the encoding of the genotype matrix while ensuring that the NAs are preserved?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions