config.save: Save/update directory config for ORFik experiments

View source: R/utils_directory_config.R

config.saveR Documentation

Save/update directory config for ORFik experiments

Description

Defines a folder for fastq files (raw_data), bam files (processed data) and references (organism annotation and STAR index)

Usage

config.save(
  file = config_file(),
  fastq.dir = file.path(base.dir, "raw_data"),
  bam.dir = file.path(base.dir, "processed_data"),
  reference.dir = file.path(base.dir, "references"),
  exp.dir = file.path(base.dir, "ORFik_experiments/"),
  base.dir = "~/Bio_data",
  conf = data.frame(type = c("fastq", "bam", "ref", "exp"), directory = c(fastq.dir,
    bam.dir, reference.dir, exp.dir))
)

Arguments

file

location of config csv, default: config_file(old_config_location = old_config_location)

fastq.dir

directory where ORFik puts fastq file directories, default: file.path(base.dir, "raw_data"), which is retrieved with: config()["fastq"]

bam.dir

directory where ORFik puts bam file directories, default: file.path(base.dir, "processed_data"), which is retrieved with: config()["bam"]

reference.dir

directory where ORFik puts reference file directories, default: file.path(base.dir, "references"), which is retrieved with: config()["ref"]

exp.dir

directory where ORFik puts experiment csv files, default: file.path(base.dir, "ORFik_experiments/"), which is retrieved with: config()["exp"]

base.dir

base directory for all output directories, default: "~/Bio_data"

conf

data.frame of complete conf object, default: data.frame(type = c("fastq", "bam", "ref", "exp"), directory = c(fastq.dir, bam.dir, reference.dir, exp.dir))

Value

invisible(NULL), file saved to disc

Examples

# Overwrite default config, with new base directory for files
#config.save(base.dir = "/media/Bio_data/") # Output files go here instead
# of ~/Bio_data
## Dont do this, but for understanding here is how to make a second config
#new_config_path <- config_file(query = "ORFik_config_2")
#config.save(new_config_path, "/media/Bio_data/raw_data/",
# "/media/Bio_data/processed_data", /media/Bio_data/references/)

JokingHero/ORFik documentation built on Dec. 21, 2024, 12:01 a.m.