Closed kforner closed 10 years ago
In the source code of snpgdsLDpruning
in SNPRelate_v0.9.19:
rv <- .C("gnrLDpruning", as.integer(startidx-1), position[flag],
as.integer(slide.max.bp), as.integer(slide.max.n), as.double(ld.threshold),
method, out_snp = logical(node$n.snp),
err = integer(1), NAOK=TRUE, PACKAGE="SNPRelate")
slide.max.bp
is treated as an integer, and actually as.integer(1e10)
is NA
.
I will fix it in the new version.
I recently used big values with snpgdsLDpruning just to be sure it used my slide.max.n parameter to define the window, and using too high values give wrong results:
The first call selects one SNP per chromosome as expected(ld.threshold = 0), but with slide.max.bp = 1e10 it suddenly selects all the SNPs.