Skip to content

Commit 7e726b4

Browse files
authored
Merge pull request #235 from thackl/fix-234
Properly address id column
2 parents 89f60ca + 0c9f9c1 commit 7e726b4

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

R/geom_gene.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ makeContent.genetree <- function(x) {
257257
cds_data <- data %>% filter(.data$type == "CDS")
258258
if (nrow(cds_data) > 0) {
259259
cds_exons <- cds_data %>%
260-
dplyr::group_by(id) %>%
260+
dplyr::group_by(.data$id) %>%
261261
dplyr::summarize(
262262
dplyr::across(c(-x, -xend, -y), first),
263263
exons = list(exon_polys(.data$x, .data$xend, .data$y, height, arrow_width, arrow_height))
@@ -269,7 +269,7 @@ makeContent.genetree <- function(x) {
269269
rna_data <- data %>% filter(.data$type != "CDS")
270270
if (nrow(rna_data) > 0) {
271271
rna_exons <- rna_data %>%
272-
dplyr::group_by(id) %>%
272+
dplyr::group_by(.data$id) %>%
273273
dplyr::summarize(
274274
dplyr::across(c(-x, -xend, -y), first),
275275
exons = list(exon_polys(.data$x, .data$xend, .data$y, rna_height, rna_arrow_width, rna_arrow_height))
@@ -290,7 +290,7 @@ makeContent.genetree <- function(x) {
290290
dplyr::group_by(.data$group) %>%
291291
# remove CDS if group has mRNA
292292
dplyr::filter(.data$type != (if ("mRNA" %in% .data$type) "CDS" else "!bogus")) %>%
293-
dplyr::group_by(id) %>%
293+
dplyr::group_by(.data$id) %>%
294294
dplyr::filter(n() > 1) %>%
295295
dplyr::summarize(
296296
dplyr::across(c(-x, -xend, -y), first),

R/position_strandpile.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ PositionStrandpile <- ggproto("PositionStrandpile", Position,
125125
} else if (params$grouped) { # i.e. multi-exon as one unit
126126
# not pretty, but works for now
127127
data_grouped <- data %>%
128-
dplyr::group_by(y, group) %>%
128+
dplyr::group_by(.data$y, .data$group) %>%
129129
dplyr::summarize(
130130
start = min(x, xend) + 1, end = max(x, xend), is_reverse = ifelse(params$strandwise,
131131
xor(min(x) > max(xend), params$flip), params$flip
132132
)
133133
)
134134

135135
data_grouped <- data_grouped %>%
136-
dplyr::group_by(y, is_reverse) %>%
136+
dplyr::group_by(.data$y, .data$is_reverse) %>%
137137
dplyr::mutate(yoff = (params$base + params$offset *
138138
stack_pos(start, end, params$gap)) *
139139
ifelse(is_reverse, -1, 1)) %>%
@@ -146,7 +146,7 @@ PositionStrandpile <- ggproto("PositionStrandpile", Position,
146146
start = pmin(x, xend) + 1, end = pmax(x, xend),
147147
is_reverse = if (params$strandwise) xor(x > xend, params$flip) else params$flip
148148
) %>%
149-
dplyr::group_by(y, is_reverse) %>%
149+
dplyr::group_by(.data$y, .data$is_reverse) %>%
150150
dplyr::mutate(yoff = (params$base + params$offset *
151151
stack_pos(start, end, params$gap)) *
152152
ifelse(is_reverse, -1, 1)) %>%

R/read.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ filter_def_formats <- function(ff, format = NULL, context = NULL, parser = NULL)
258258
if (!is.null(context)) {
259259
# context=NA defines fallback parser which is always last in arrange
260260
ff <- ff %>%
261-
dplyr::group_by(format) %>%
261+
dplyr::group_by(.data$format) %>%
262262
dplyr::filter(context %in% !!context | is.na(context)) %>%
263263
dplyr::arrange(context, .by_group = TRUE) %>%
264264
slice_head(n = 1)

0 commit comments

Comments
 (0)