adjclust
adjclust copied to clipboard
snpClust Problem while setting all > 1 to 1
Hello,
I have a problem while trying to cluster my LD (large dgCMatrix) with snpClust.
My input is a non-public data set, so I cannot hand over the data. But I ran the following steps:
h <- 5
ld <- snpStats::ld(geno, stats = c("R.squared"), depth = h)
Resulting in ld being a Large dgCMatrix with dimensions 59087 x 59087.
Then I tried to cluster the matrix with snpClust:
fitH <- adjclust::snpClust(geno, h = h, stats = "R.squared")
And I am getting this error: Error in if (any(i < 0L)) { : missing value where TRUE/FALSE needed In addition: Warning messages: 1: In run.snpClust(x, h = h, stats = stats) : Forcing the LD similarity to be smaller than or equal to 1 2: In int2i(as.integer(i), n) : NAs introduced by coercion to integer range
I already checked, the error occurs in line 12 of the function run.snpClust.
Can you help me? I don't know why this is line is making an error.