Skip to content

Commit

Permalink
Got rid of .groups which caused errors with some versions of tidyverse
Browse files Browse the repository at this point in the history
  • Loading branch information
erikrikarddaniel committed Oct 23, 2020
1 parent cbc6b6c commit f8fbdb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "1.9.11" %}
{% set version = "1.9.12" %}

package:
name: pfitmap-db
Expand Down
10 changes: 5 additions & 5 deletions src/R/pf-classify.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ suppressPackageStartupMessages(library(tidyr))
suppressPackageStartupMessages(library(stringr))
suppressPackageStartupMessages(library(feather))

SCRIPT_VERSION = "1.9.11"
SCRIPT_VERSION = "1.9.12"
ROWS_PER_SEQUENCE_TSV = 1e7

options(warn = 1)
Expand Down Expand Up @@ -171,7 +171,7 @@ if ( gtdb ) {
# Delete duplicate taxon, rank combinations belonging in Eukaryota
taxflat <- lazy_dt(taxflat) %>%
anti_join(
lazy_dt(taxflat) %>% group_by(taxon, trank) %>% summarise(n = n(), .groups = 'drop_last') %>% ungroup() %>% filter(n > 1) %>%
lazy_dt(taxflat) %>% group_by(taxon, trank) %>% summarise(n = n()) %>% ungroup() %>% filter(n > 1) %>%
inner_join(lazy_dt(taxflat) %>% filter(tdomain == 'Eukaryota'), by = c('taxon', 'trank')),
by = c('ncbi_taxon_id')
) %>%
Expand Down Expand Up @@ -366,7 +366,7 @@ for ( fs in list(
lazy_dt(nextjoin) %>% select(accno, profile, from, to) %>%
inner_join(lazy_dt(nextjoin) %>% select(accno, profile, from, to), by = c('accno', 'profile', 'to')) %>%
filter(from.x != from.y) %>%
group_by(accno, profile, to) %>% summarise(from = max(from.x), .groups = 'drop_last') %>% ungroup(),
group_by(accno, profile, to) %>% summarise(from = max(from.x)) %>% ungroup(),
by = c('accno', 'profile', 'from', 'to')
) %>%
as.data.table()
Expand All @@ -384,7 +384,7 @@ for ( fs in list(
lengths <- as_tibble(lengths) %>%
union(
as_tibble(nooverlaps) %>% mutate(len = to - from + 1) %>%
group_by(accno, profile) %>% summarise(len = sum(len), from = min(from), to = max(to), .groups = 'drop_last') %>% ungroup() %>%
group_by(accno, profile) %>% summarise(len = sum(len), from = min(from), to = max(to)) %>% ungroup() %>%
gather(type, val, len, from, to) %>% # Change to pivot_longer()!
mutate(
type = case_when(
Expand Down Expand Up @@ -588,7 +588,7 @@ if ( ! gtdb ) {
accessions <- as_tibble(accessions) %>%
arrange(db, taxon, accno, accto) %>%
group_by(db, taxon, accno) %>%
summarise(accto = paste(accto, collapse = ','), .groups = 'drop_last') %>%
summarise(accto = paste(accto, collapse = ',')) %>%
ungroup() %>%
separate_rows(accto, sep = ',') %>%
distinct()
Expand Down

0 comments on commit f8fbdb0

Please sign in to comment.