Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
kalidouBA committed Dec 6, 2023
1 parent 1cf760d commit 3aee19c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/DICEPRO.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ DICEPRO <- function(reference, bulk, nIteration = 50, methodDeconv = "CSx", metr
out_Dec <- running_method(B, W, methodDeconv, cibersortx_email, cibersortx_token)
B_Deconv <- as.matrix(W) %*% t(out_Dec)

matrixAbundances <- rbind(matrixAbundances, c(out_Dec[,cellTypeName], "Iteraion" = it_))
matrixAbundances <- rbind(matrixAbundances, cbind(out_Dec[,cellTypeName], "Iteraion" = it_))

if (it_ > 0) {
perform_it <- computPerf(matrixAbundances[matrixAbundances[,"Iteraion"] == it_-1, cellTypeName],
Expand All @@ -104,7 +104,6 @@ DICEPRO <- function(reference, bulk, nIteration = 50, methodDeconv = "CSx", metr

performs <- c(performs, perform_it)
performs2plot <- rbind.data.frame(performs2plot, data.frame(metric = perform_it, Iterate = it_))

normFrobs <- c(normFrobs, normFrob_it)

if (length(performs) > 1 &&
Expand All @@ -126,7 +125,8 @@ DICEPRO <- function(reference, bulk, nIteration = 50, methodDeconv = "CSx", metr

res <- nmf_conjugate_gradient(V = B, W = W_init, H = H_init, k_CT+1)
W <- res$W
colnames(W)[k_CT+1] <- paste0("Unknown_", it_)
colnames(W) <- c(cellTypeName, paste0("Unknown_", it_))
rownames(W) <- geneIntersect
}
}

Expand Down

0 comments on commit 3aee19c

Please sign in to comment.