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

tagmPredict compatibility with Novelty TAGM results #138

Open
ococrook opened this issue Sep 11, 2020 · 0 comments
Open

tagmPredict compatibility with Novelty TAGM results #138

ococrook opened this issue Sep 11, 2020 · 0 comments
Assignees
Labels

Comments

@ococrook
Copy link
Collaborator

tagmPredict gives and error when using NoveltyTAGM results instead of usually MCMC results:

tanTAGMnov <- tagmMcmcTrain_Nov(object = tan2009r1,
                                fcol = "markers",
                                numIter = 100, # typically needs to be 15,000+
                                thin = 2, #typically about 10
                                burnin = 20, # typically about 10,000
                                numChains = 1, # chais in parraellel recommend 4+
                                beta0 = 1, # recommend 1 or 1/number of proteins
                                K_bar = 10) # number of new classes allowed


tanTagmNoveltyRes <- tagmNoveltyProcess(object = tan2009r1, params = tanTAGMnov)

tanTagmNoveltyparams <- tagmMcmcProcess(tanTAGMnov)

tan2009r1 <- tagmPredict(object = tan2009r1, params = tanTagmNoveltyparams, probJoint = TRUE)

Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent

The offending lines in tagmMcmcpreidct are

 K <- chains(params)[[1]]@K
 .joint <- rbind(params@summary@tagm.joint, .probmat)

These need to replaced with

  K <- length(markers)
.joint <- rbind(params@summary@tagm.joint[, markers], .probmat)
@ococrook ococrook self-assigned this Sep 11, 2020
@ococrook ococrook added the bug label Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant