PoonLab / KaphiShiny

A Shiny web interface for running Kaphi
0 stars 0 forks source link

run.smc can't find config #4

Closed 0ldM4j0r closed 7 years ago

0ldM4j0r commented 7 years ago

The app crashes at the following line (The branch is: initConfig), note that this line is comented out in the last commit, tree used: ((A:1,B:1):1,C:1);

res <- run.smc(ws, model=input$specificModel, verbose=F)

The following error message is generated:

Warning: Error in t: object 'config' not found
Stack trace (innermost first):
    69: t
    68: is.data.frame
    67: write.table
    66: run.smc
    65: observeEventHandler [/home/fabusard/git/KaphiShiny/app.R#176]
     1: runApp

I checked config in ws and it is there.

ArtPoon commented 7 years ago

Need to swap these lines:

  write.table(t(c(
    'n', 'part.num', 'weight', config$params, paste0('dist.', 1:config$nsample)
    )), file=trace.file, sep='\t', quote=FALSE, row.names=FALSE, col.names=FALSE)

    config <- ws$config
0ldM4j0r commented 7 years ago

Switching the two lines fixed the issue.