Skip to content

Commit

Permalink
make track_type accept unquoted and positional track_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
thackl committed Nov 30, 2021
1 parent 8b85785 commit 3f4ed61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/tracks.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ track_info.gggenomes <- function(x, ...){

#' @export
track_info.gggenomes_layout <- function(x, track_type = c("seqs", "feats", "links")){
track_type <- match.arg(track_type, several.ok = TRUE)
track_type <- match_arg(track_type, several.ok = TRUE)
y <- tibble(
id = track_ids(x, track_type),
type = track_types(x, track_type),
Expand Down Expand Up @@ -68,6 +68,7 @@ track_nrows <- function(x, track_type = c("seqs", "feats", "links")){
#' @return a character string with the track type
track_type <- function(x, track_id){
track_ids <- track_ids(x)
track_id <- vars_track(x, {{track_id}})
names(track_ids)[track_ids == track_id]
}

Expand Down

0 comments on commit 3f4ed61

Please sign in to comment.