Skip to content

Commit 5b36b3e

Browse files
committed
small bug fix to R version
1 parent 248ef13 commit 5b36b3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/pairsnp/R/snp_dist.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ snp_dist <- function(sparse.data, compare.n=FALSE){
4141
} else {
4242
total.n <- colSums(sparse.data$snp.matrix==5)
4343

44-
n.cols.submatrix <- 1*(sparse.data$snp.matrix>0)[sparse.data$consensus==4,]
44+
n.cols.submatrix <- 1*(sparse.data$snp.matrix>0)[sparse.data$consensus==5,]
4545
cons.snps.N <- as.matrix(tcrossprod(t(n.cols.submatrix)))
4646
tot.cons.snps.N <- colSums(n.cols.submatrix)
4747
tot.cons.snps.N <- (matrix(rep(tot.cons.snps.N, n.isolates), nrow = n.isolates, byrow = TRUE) +

0 commit comments

Comments
 (0)