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

Catch various errors #14

Open
gadenbuie opened this issue Apr 10, 2019 · 0 comments
Open

Catch various errors #14

gadenbuie opened this issue Apr 10, 2019 · 0 comments

Comments

@gadenbuie
Copy link
Member

gadenbuie commented Apr 10, 2019

There are a few errors I've seen in the log files. I'm not sure what inputs trigger these and I'm not sure what happens on the UI side, either, although I would guess they result in red error message text.

epiTAD/server.R

Lines 176 to 181 in ce0d031

output$eTable1 <- DT::renderDataTable({
dat <- dat()
dat <- dat[dat$eQTL != ".", ]
etest <- strsplit(as.character(dat$eQTL), ";")
names(etest) <- dat$rsID
etest2 <- unlist(strsplit(unlist(etest), ","))

Warning: Error in strsplit: non-character argument
  104: strsplit
  102: exprFunc [/srv/shiny-server/epiTAD/server.R#181]
  101: widgetFunc
  100: func
   87: origRenderFunc
   86: renderFunc
   82: origRenderFunc
   81: output$eTable1
    1: runApp

FIXED:

epiTAD/server.R

Lines 113 to 118 in ce0d031

snps <- as.character(unlist(strsplit(input$snpList, ",")))
snps <- trimws(snps)
x <- queryRegulome(query = snps)
shiny::validate(need(nrow(x$res.table) > 0, SNP_QUERY_ERROR))
x <- as.data.frame(x$res.table)
x$score <- as.character(x$score)

Warning: Error in $<-.data.frame: replacement has 0 rows, data has 790
  150: stop
  149: $<-.data.frame
  147: eventReactiveHandler [/srv/shiny-server/epiTAD/server.R#118]
  103: dat2
  102: exprFunc [/srv/shiny-server/epiTAD/server.R#293]
  101: widgetFunc
  100: func
   87: origRenderFunc
   86: renderFunc
   82: origRenderFunc
   81: output$LDtable2
    1: runApp

FIXED:

Also, this warning occurs frequently and can probably be fixed.

epiTAD/server.R

Lines 157 to 165 in ce0d031

in_tad <- eventReactive(input$update1, {
snps <- snps()
dat <- dat()
dat <- dat[dat$rsID %in% snps, ]
snp_pos <- dat$pos_hg38
tad <- tad[tad$chr == max(dat$chr, na.rm = TRUE), ]
in_tad <- tad[tad$start_position <= snp_pos & tad$end_position >= snp_pos, ]
return(in_tad)
})

Warning in tad$start_position <= snp_pos :
  longer object length is not a multiple of shorter object length
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

1 participant