thelovelab / tximport

Transcript quantification import for modular pipelines
136 stars 33 forks source link

added check for timezone and Olson database #48

Closed ATpoint closed 3 years ago

ATpoint commented 3 years ago

Hi Mike,

this PR adds a minimal test to avoid this edge-case issue related to the readr package: https://github.com/tidyverse/readr/issues/952

The readr package (for the importer argument of tximport) requires a timezone to be set and an existing Olson database on the system. Some containers (e.g. the Docker image I was using, in this case based on condaforge/mambaforge:4.10.3-1) are very stripped down and have no such database and (I guess as a consequence) do not have a timezone set. That then lets read_tsv choke with an error as in the linked issue. The added line of code in the PR simply checks that both a timezone is set and that this database exists, and if not then falls back to read.delim as the importer. Here is the relevant line:

https://github.com/mikelove/tximport/pull/48/commits/33f91d8c58954b9332b272e66096a3415a70e818#diff-fac4b654aa964566c2c5727be81b1c51e2b3ba78d85458de15250d7e710b5399R348

mikelove commented 3 years ago

Thanks, I'll add this in and make sure it passes check.