Skip to content

Commit

Permalink
fix a bug that missing sqrt in the mds function
Browse files Browse the repository at this point in the history
  • Loading branch information
ningbioinfo committed Oct 24, 2023
1 parent 62dff22 commit bc7ce67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions R/plotDR.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ pdataMDS_intl <- function(mdsdata, dims) {
lambda <- pmax(mdsdata$eigen.values, 0)
plotdf <- data.frame(
"RestoolsMtchID" = rownames(mdsdata$distance.matrix.squared),
x = mdsdata$eigen.vectors[, dims[1]] * lambda[dims[1]],
y = mdsdata$eigen.vectors[, dims[2]] * lambda[dims[2]]
x = mdsdata$eigen.vectors[, dims[1]] * sqrt(lambda[dims[1]]),
y = mdsdata$eigen.vectors[, dims[2]] * sqrt(lambda[dims[2]])
)
pca_labs <- paste0("Leading logFC dim ", seq(ncol(mdsdata$eigen.vectors)))
pca_labs <- paste0(pca_labs, " (", round(mdsdata$var.explained * 100, digits = 2), "%)")
Expand Down

0 comments on commit bc7ce67

Please sign in to comment.