diff --git a/R/TENxPeaks-class.R b/R/TENxPeaks-class.R index 47c47d5..e1dc1de 100644 --- a/R/TENxPeaks-class.R +++ b/R/TENxPeaks-class.R @@ -85,6 +85,8 @@ TENxPeaks <- function(resource, extension, ...) { #' @export setMethod("import", "TENxPeaks", function(con, format, ...) { .checkPkgsAvail("readr") + if (identical(Sys.info()[["sysname"]], "Darwin")) + readr::local_edition(1) panno <- readr::read_tsv( file = path(con), col_types = c("c", "n", "n", "c", "n", "c") ) diff --git a/R/TENxTSV-class.R b/R/TENxTSV-class.R index 7dbb64f..c91a281 100644 --- a/R/TENxTSV-class.R +++ b/R/TENxTSV-class.R @@ -9,9 +9,9 @@ #' @details Typical `.tsv` files obtained from the 10X website are compressed #' and contain information relevant to 'barcodes' and 'features'. Currently, #' the code only supports files such as `features.tsv.*` and `barcodes.tsv.*`. -#' +#' #' @inheritParams TENxMTX-class -#' +#' #' @return A `TENxTSV` class object; a `tibble` for the import method #' #' @exportClass TENxTSV @@ -27,6 +27,8 @@ #' @export setMethod("import", "TENxTSV", function(con, format, text, ...) { resource <- path(con) + if (identical(Sys.info()[["sysname"]], "Darwin")) + readr::local_edition(1) df <- readr::read_tsv( resource, col_names = FALSE, show_col_types = FALSE, progress = FALSE, ... @@ -40,7 +42,7 @@ setMethod("import", "TENxTSV", function(con, format, text, ...) { }) #' @rdname TENxTSV-class -#' +#' #' @inheritParams TENxMTX #' #' @export