search for: disnp

Displaying 1 result from an estimated 1 matches for "disnp".

Did you mean: discnp
2007 Jan 21
2
efficient code. how to reduce running time?
...i: desired proportion of variation due to QTN pi = 0.05; print (paste("pi:", pi)); MAF = 0.05; print (paste("MAF:", MAF)); # S: number of segregating sites S = length(snp[1,]); # N: number of samples N = length(snp[,1]); Dips = sample(1:N,N) DipA = Dips[1:50] DipB = Dips[51:100] disnp = snp[DipA,]+snp[DipB,] snp = as.data.frame(disnp, row.names=NULL); N = length(snp[,1]); # get allele freq for all SNPs allele_f <- mean(snp[,1:S])/2; print (allele_f); sites = rfind(allele_f); print(sites); # collapse sites that have perfect correlation newsites <- sites; for (i in 1:(leng...