Skip to contents

write_study() saves the study as study.rds plus plain TSV copies of the metadata, the expected-count, TPM, and effective-length matrices, a sample-to-file table, and study-info.tsv. read_study() restores the study.rds.

Usage

read_study(path)

write_study(study, path)

Arguments

path

Study directory or a study.rds path.

study

A rsemflow_study.

Value

read_study() returns an object of class rsemflow_study; write_study() invisibly returns path.

Examples

ex <- system.file("extdata", "example", package = "rsemflow")
study <- read_rsem_study(file.path(ex, "data"), file.path(ex, "metadata.tsv"))
out <- file.path(tempdir(), "study")
write_study(study, out)
list.files(out)
#> [1] "effective_length.tsv" "expected_count.tsv"   "metadata.tsv"        
#> [4] "samples.tsv"          "study-info.tsv"       "study.rds"           
#> [7] "tpm.tsv"             
identical(read_study(out)$sample_ids, study$sample_ids)
#> [1] TRUE