Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running spatialdecon() on COSMx data #43

Open
hcurley opened this issue Oct 10, 2022 · 1 comment
Open

Error when running spatialdecon() on COSMx data #43

hcurley opened this issue Oct 10, 2022 · 1 comment

Comments

@hcurley
Copy link

hcurley commented Oct 10, 2022

lung12.expr <- read.delim("Lung12_exprMat_file.csv", sep=",")
rownames(lung12.expr) <- paste(lung12.expr$cell_ID, lung12.expr$fov, sep="_")
lung12.expr$cell_ID <- NULL
lung12.expr$fov <- NULL

Row.sums.expr <- rowSums(lung12.expr)
length(which(Row.sums.expr < 20))/nrow(lung12.expr)*100
#3.415062
lung12.expr2 <- lung12.expr[-which(Row.sums.expr < 20),]

lung12.expr2f <- lung12.expr2
lung12.expr2n <- lung12.expr2
for(i in 1:ncol(lung12.expr2)){
lung12.expr2f[,i] <- as.factor(lung12.expr2[,i])
lung12.expr2n[,i] <- as.numeric(as.character(lung12.expr2f[,i]))
}

Row.sums.expr2 <- rowSums(lung12.expr2n)
lung12.scaled.expr <- sweep(lung12.expr2n, 1, Row.sums.expr2, "/")

negnames = c("NegPrb3","NegPrb5","NegPrb6","NegPrb7", "NegPrb8","NegPrb9","NegPrb10","NegPrb11","NegPrb12","NegPrb13","NegPrb14","NegPrb15","NegPrb16","NegPrb17","NegPrb18","NegPrb19","NegPrb20","NegPrb21","NegPrb22","NegPrb23")

Lung12 <- list()
Lung12[[1]] <- t(lung12.scaled.expr)
Lung12[[2]] <- t(lung12.expr2n)
names(Lung12) <- c("normalized", "raw")

Lung12$bg <- derive_GeoMx_background(
norm = Lung12$normalized,
probepool = rep(1, nrow(Lung12$normalized)),
negnames = c("NegPrb3","NegPrb5","NegPrb6","NegPrb7", "NegPrb8","NegPrb9","NegPrb10","NegPrb11","NegPrb12","NegPrb13","NegPrb14","NegPrb15","NegPrb16","NegPrb17","NegPrb18","NegPrb19","NegPrb20","NegPrb21","NegPrb22","NegPrb23")
)

res0 <- spatialdecon(
norm = Lung12$normalized,
bg = Lung12$bg,
X = safeTME
)

Error in solve.default(fit$hessian) :
Lapack routine dgesv: system is exactly singular: U[1,1] = 0
In addition: Warning message:
In lognlm.fit3(X = X, y = Y, par = par0, lik = lik, opt = opt, offset = offset, :
Unsuccessful convergence

Any idea what is going on here?

@maddygriz
Copy link
Collaborator

Hi @hcurley,

Our customer support team will be able to help you with this. Please email geomxsupport@nanostring.com with your issue.

Thanks,
Maddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants