Skip to content

Commit

Permalink
small bug fix to R version
Browse files Browse the repository at this point in the history
  • Loading branch information
gtonkinhill committed Sep 11, 2018
1 parent 248ef13 commit 5b36b3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/pairsnp/R/snp_dist.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ snp_dist <- function(sparse.data, compare.n=FALSE){
} else {
total.n <- colSums(sparse.data$snp.matrix==5)

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

0 comments on commit 5b36b3e

Please sign in to comment.