knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Read, ~~Validate~~, ~~Simulate~~ and ~~Write~~ YeastGrower (aka ACCESS) files.
# install.packages("readyg") # not yet. remotes::install_github("npjc/readyg")
Yeast Grower/ACCESS files are written in windows ini format (sort-of). read_yg() parses this format and returns the data in a format suitable for analysis or exporting (writing) to a .csv files.
library(readyg) files <- yg_example_files() read_yg(files[1]) read_yg(files[1], all_fields = TRUE) # full yg has quite a lot of fields...
In the individual sections:
d <- read_yg(files[1], all_fields = TRUE) d$data d$run_params d$drug_data
If you want the information in the other sections , you can use read_ini()
instead. This parses the ini file into a list:
l <- read_ini(files[1]) str(l, 1)
YeastGrower/ACCESS encodes data in non-standard ways that read_yg() corrects:
data section:
300, 30, 30.0 to indicate 30ÂșC. D0_12:11:10, D0 _12:11:10 or 12:11:10 to indicate 12:11:10 on the first day of the run. To indicate what date D0 is you can provide this as an argument to e.g. read_yg('path/to/file.txt', start_date = 'YYYY-MM-DD'). 12:11:10 and the run last longer that one day the current results may be erroneous. e.g. 12:11:10, ... , 23:48:17, ... , 00:12:34 would be encoded as the same day. This is the safe default but will provide an option to 'fix' this in the future. Well_Alias field which is currently not checked for this inconsistency. Handle with care if using this information. all the keys
The Yeast Grower format has some use of nearly 3000 separte keys (fields). To retrieve all of them:
yg_section_keys()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.