This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CNV Computation with HoneyBadger

Hello everyone,

I have a seurat object where I defined the cells as immune cells based on their AUCell scores so that I could use them as a normal cell to compute the CNVs of malignant cells. For that purpose I use the HoneyBADGER. However, when running the HoneyBADGER, I am running a problem.

#Extract Raw Count matrices since HoneyBADGER uses raw counts

# Raw counts from RNA assay
raw_counts <- GetAssayData(merged_data, layer  = "RNA", slot = "counts")

# Subset
tumor_counts  <- raw_counts[, tumor_cells]
normal_counts <- raw_counts[, immune_cells]

# Average gene expression across immune (normal) cells
# HoneyBADGER expects a vector of avrg expression from normal cells
normal_ref <- Matrix::rowMeans(normal_counts)

mart.obj <- useMart(
biomart = "ENSEMBL_MART_ENSEMBL",
dataset = "hsapiens_gene_ensembl"
 )


#Initialize and run HoneyBADGER
# Create the object
hb <- new("HoneyBADGER", name = "Malignant_CNVs")

#  Set tumor and reference expression
hb$setGexpMats(
tumor_counts,
normal_ref,
mart.obj,          # <-- key addition
filter = FALSE,
scale = FALSE,
verbose = TRUE
 )

# Fit variance model
hb$setMvFit(verbose = TRUE)

# Calculate deviation and boundaries
hb$setGexpDev(verbose = TRUE)
hb$calcGexpCnvBoundaries(init = TRUE,verbose=FALSE)

When I run the hb$calcGexpCnvBoundaries(init = TRUE,verbose=FALSE) it takes like 45 minutes but then gives error:

Error in jags.model(modelFile, data = data, inits = inits, n.chains = 4,  : 
no method for coercing this S4 class to a vector

How could I fix that issue?

Thank you so much in advance! Metehan

cnv honeybadger

0 answers

No answers yet.

Log in to answer this question.