Skip to content

Catch various errors #14

@gadenbuie

Description

@gadenbuie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions