Skip to content

gene.name="" and gene.name="Ensembl ID" fail #47

@ijhoskins

Description

@ijhoskins

geom_transcript fails when gene.name="" or gene.name is an Ensembl ID, even when passing gene.name.type="gene_id" to LoadTrackFile.

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)
 . }))

It would be nice if ggcoverage supported genes that have no gene symbol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions