Skip to content

Commit

Permalink
properly handle default type=NA for all genes, fixes #148
Browse files Browse the repository at this point in the history
  • Loading branch information
thackl committed Apr 19, 2023
1 parent 06195f7 commit 934b50c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gggenomes
Title: A Grammar of Graphics for Comparative Genomics
Version: 0.9.7.9000
Version: 0.9.8.9000
Authors@R: c(
person("Thomas", "Hackl", email = "thackl@lim4.de", role = c("aut", "cre")),
person("Markus J.", "Ankenbrand", email = "iimog@iimog.org", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions R/pull_tracks.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ pull_feats.gggenomes_layout <- function(.x, .track_id=1, ..., .ignore="genes",
track <- introduce(track,
type="CDS", introns = list(NULL),
geom_id = paste0("geom_", row_number()))
if(all(is.na(track$type))){
inform('Only saw `type=NA` in genes and will treat everything as `type="CDS"`.')
track$type <- "CDS"
}
}
filter(track, ...)
}
Expand Down

0 comments on commit 934b50c

Please sign in to comment.