Open
Description
I was using the default binning (bin.size=10) in LoadTrackFile with BAM file inputs, which caused the coordinates to be misannotated and led to the following error when adding a geom_transcript layer:
Error in if (nrow(data)) {: argument is of length zero
Traceback:
1. add_ggplot(e1, e2, e2name)
2. ggplot_add(object, p, objectname)
3. ggplot_add.transcript(object, p, objectname)
4. geom_arrows(gene.tx.df.exon, color.by, exon.size, arrow.length,
. arrow.angle, arrow.type)
5. .handleSimpleError(function (cnd)
. {
. watcher$capture_plot_and_output()
. cnd <- sanitize_call(cnd)
. watcher$push(cnd)
. switch(on_error, continue = invokeRestart("eval_continue"),
. stop = invokeRestart("eval_stop"), error = invokeRestart("eval_error",
. cnd))
. }, "argument is of length zero", base::quote(if (nrow(data)) {
. if (!"strand" %in% colnames(data)) {
. data$strand <- "+"
. }
. geom_segment(inherit.aes = TRUE, data = data, mapping = aes(x = .data[["start"]],
. y = .data[["group"]], xend = .data[["end"]], yend = .data[["group"]],
. color = .data[[color]]), arrow = arrow(ends = ifelse(data$strand ==
. "+", "last", "first"), angle = arrow_angle, length = unit(arrow_size,
. "points"), type = arrow_type), lineend = "butt", linejoin = "mitre",
. show.legend = FALSE, linewidth = line_width)
Setting bin.size=NULL fixed the issue.
Metadata
Metadata
Assignees
Labels
No labels