combine_dfs: Combine (and optionally process) data for one simulation

Description Usage Arguments Details Value Examples

View source: R/datacollation.R

Description

Combine (and optionally process) data for one simulation

Usage

1
2
3
combine_dfs(full_dir, include_diversities = TRUE, df_type = "output",
  max_generation = FALSE, vaf_cut_off = NA, generation = NA,
  numcells = NA, num_parameters = NA, ExitCode4 = FALSE)

Arguments

full_dir

base input directory name

include_diversities

boolean whether to include diversity metrics (if df_type == "output")

df_type

which dataframes to combine

max_generation

If TRUE then results are returned only for the final generation

vaf_cut_off

exclude genotypes with vaf lower than cut off (if df_type == "genotype_properties" or "driver_genotype_properties")

generation

Generation at which to filter (default NA corresponds to no filtering)

numcells

Number of cells at which to filter (default NA corresponds to no filtering)

num_parameters

Number of parameters, accounting for the first set of columns in the dataframe (optional, but may improve speed)

ExitCode4

Allow to deal with simulations including treatment. Simulations for which the tumor die at the treatment time end with "Exit Code =4", we need to deal in a specific way (i.e need to remove the lines with Treated==1) with these simulations when combining the output (as these simulations have most columns containing missing valeus/NA after the treatment).

Details

If both generation and numcells are provided then numcells takes precedent.

Value

the combined dataframe

Examples

1
2
3
4
5
6
7
combine_dfs(system.file("extdata", "", package = "demonanalysis", mustWork = TRUE))
combine_dfs(full_dir = system.file("extdata", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "driver_genotype_properties")
combine_dfs(full_dir = system.file("extdata", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "genotype_properties", vaf_cut_off = 0.002)
combine_dfs(full_dir = system.file("extdata", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "genotype_counts", numcells = 100)

robjohnnoble/demonanalysis documentation built on June 30, 2020, 12:47 a.m.