Skip to content

Commit

Permalink
check debug line
Browse files Browse the repository at this point in the history
  • Loading branch information
littlecabiria committed Nov 29, 2024
1 parent f0d111e commit 6f453b3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/helpers/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ calculate_recall <- function(real_svg, sim_svg) {

# cell type deconvolution
CARD_processing <- function(sp_adata, sc_adata){
requireNamespace("MuSiC", quietly = TRUE)
requireNamespace("CARD", quietly = TRUE)
spatial_count <- Matrix::t(sp_adata$layers[["counts"]])
spatial_location <- cbind.data.frame(
x = sp_adata$obs$col,
Expand All @@ -88,7 +86,7 @@ CARD_processing <- function(sp_adata, sc_adata){
)
rownames(sc_meta) <- sc_meta$cellID
rownames(spatial_location) <- colnames(spatial_count)

print(89)
CARD_obj <- CARD::createCARDObject(
sc_count = sc_count,
sc_meta = sc_meta,
Expand All @@ -99,16 +97,15 @@ CARD_processing <- function(sp_adata, sc_adata){
sample.varname = "sampleInfo",
minCountGene = 100,
minCountSpot = 5)

print(100)
CARD_obj <- CARD::CARD_deconvolution(CARD_object = CARD_obj)

print(102)
Proportion_CARD <- as.matrix(CARD_obj@Proportion_CARD)

return(Proportion_CARD)

}


generate_jds <- function(real, sim) {
common_row_names <- intersect(rownames(real), rownames(sim))
real_common <- real[common_row_names, , drop = FALSE]
Expand Down

0 comments on commit 6f453b3

Please sign in to comment.