GetParameters: Get Parameters

View source: R/seqNdisplayR.R

GetParametersR Documentation

Get Parameters

Description

Internal function: Reads parameters from Excel template

Usage

GetParameters(samples_df, params_df)

Arguments

samples_df

Dataframe based on SAMPLES sheet in Excel template (see details)

params_df

Dataframe based on DATASET_OPTIONS sheet in Excel template

Details

Prepare seqNdisplayR parameters based on info in param_df. param_df needs to contain a column called dataset, all column names are considered names of dataset-specific options. Each row should contain one dataset and its information. See examples below. Batch information is from a data frame containing the track info. Needs to contain at a minimum columns strand, batch and dataset. Strand must be 'plus' or 'minus', use 'plus' for unstranded data. If batch is all empty, NAs or all identical, will assume no batch correction, otherwise set parameters to batch correction using information from the batch column. You can manually change individual parameters after this (see examples below in the man page).

Value

Named list

Author(s)

MS

Examples

samples_df = data.frame(bigwig_file=c('a.bw', 'b.bw', 'c.bw', 'd.bw', 'e.bw', 'f.bw'),
  strand = rep('plus', 6),
  batch = rep(NA, 6),
  dataset=c(rep('a',4), rep('b',2)),
  subgroup_1=c('x','x','y','y', 'x','y'), stringsAsFactors=FALSE)
params_df = data.frame(dataset=c('a','b'), calcMean=c('TRUE','FALSE'), log2Transform=c('TRUE','FALSE'), stringsAsFactors=FALSE)
GetParameters(samples_df, params_df)

df = data.frame(bigwig_file=c('a.bw', 'b.bw', 'c.bw', 'd.bw', 'e.bw', 'f.bw'),
  strand = rep('plus', 6),
  batch = rep(c('rep1','rep2'), 3),
  dataset=c(rep('a',4), rep('b',2)),
  subgroup_1=c('x','x','y','y', 'x','y'), stringsAsFactors=FALSE)
params = GetParameters(df, params_df)
params

#change specific arguments afterwards
params$a$calcMean = FALSE
params$b$log2Transform = TRUE


THJlab/seqNdisplayR documentation built on Nov. 13, 2024, 10:36 a.m.