Hi,
I wish to perform a random permutation analysis, for which I need to randomly select SNPs. I was thinking that these SNPs should ideally come from a list of all independent SNPs. Initially I thought that I could perform clumping or pruning of e.g. HapMap data in PLINK, but upon closer inspection I'm not sure this would work, as both have some kind of selection (MAF or P-value) that might introduce a bias in my independent SNP set. Not to mention the fact that I don't actually have p-values to base this on.
This random permutation analysis I'm attempting isn't new, so I'm wondering if there are existing SNP datasets of independent SNPs I could use. Or how I could best go about creating my own.
Any help is appreciated!
1 answer
Based on what you want to do, I'd go with clumping, but with randomized p-value. So some pseudo R code will be
library(data.table)
dat <- fread("bim file")
fake <- dat[,c("SNP")]
for(i in 1:perm){
fake[,P:= runif(.N, min=0, max=1)
fwrite(fake, sep="\t")
# Sysmtem call to clumping step
# Your analysis here
}
Now because your p-value are randomize, clumping will generate a random set of "independent" SNPs.
Log in to answer this question.