Skip to content

Commit

Permalink
oma_organisms: adjusted to new column layout from OMA
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Sep 28, 2024
1 parent 9928e08 commit ee7e7c3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/oma.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#'
#' @importFrom readr cols
#' @importFrom magrittr %>%
#' @importFrom dplyr mutate
#' @export
#' @seealso \code{\link{ensembl_organisms}}
oma_organisms <- function() {
Expand All @@ -38,16 +39,18 @@ oma_organisms <- function() {
reader_param = list(
col_names = c(
'oma_code',
'oma_tax_id',
'ncbi_tax_id',
'gtdb_genome',
'latin_name',
'genome_source',
'oma_version'
),
col_types = cols(),
skip = 3L
)
) %>%
mutate(
gtdb_tax_id = ifelse(ncbi_tax_id < 0L, -ncbi_tax_id, NA),
ncbi_tax_id = ifelse(ncbi_tax_id < 0L, NA, ncbi_tax_id)
)

}
Expand Down

0 comments on commit ee7e7c3

Please sign in to comment.