In order to perform MR the effect of a SNP on an outcome and exposure must be harmonised to be relative to the same allele.
harmonise_data(exposure_dat, outcome_dat, action = 2)
Level of strictness in dealing with SNPs.
Data frame with harmonised effects and alleles
Expects data in the format generated by
This means the inputs must be dataframes with the following columns:
The function tries to harmonise INDELs. If they are coded as sequence strings things work more smoothly. If they are coded as D/I in one dataset it will try to convert them to sequences if the other dataset has adequate information. If coded as D/I in one dataset and as a variant with equal length INDEL alleles in the other, the variant is dropped. If one or both the datasets only has one allele (i.e. the effect allele) then harmonisation is naturally going to be more ambiguous and more variants will be dropped.