plot_all_charts: Plot a set of charts representing allele frequencies and...

Description Usage Arguments Details Value Examples

View source: R/demonanalysis.R

Description

Plot a set of charts representing allele frequencies and genotype sizes

Usage

1
2
3
4
plot_all_charts(path_or_dflist, output_filename = NA,
  file_type = "png", output_dir = NA, max_size = NA,
  generation = NA, numcells = NA, max_count = 10,
  num_parameters = NA)

Arguments

path_or_dflist

folder containing the input files, or a list of data frames

output_filename

name of output image file

file_type

either "pdf" or "png" (other values default to "pdf")

output_dir

folder in which to save the image file; if NA then plots are displayed on screen instead

max_size

maximum size (default NA corresponds to plotting frequencies, not sizes)

generation

Generation at which to make the measurement (default NA corresponds to the final Generation)

numcells

Number of cells at which to make the measurement (default NA corresponds to the final size)

max_count

Max value of y-axis in counts plot

num_parameters

Number of parameters, accounting for the first set of columns in the dataframe

Details

If both generation and numcells are provided then numcells takes precedent. A value for num_parameters is required only if the input data represents multiple simulations and either generation or numcells is specified.

Value

plot displyed on screen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
plot_all_charts(system.file("extdata", "", package = "demonanalysis", mustWork = TRUE))
plot_all_charts(list(output_allele_counts, output_driver_allele_counts, 
output_genotype_counts, output_driver_genotype_counts))

# combining results from multiple simulations:
df1 <- all_output(system.file("example_batch", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "allele_counts", generation = 10)
df2 <- all_output(system.file("example_batch", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "driver_allele_counts", generation = 10)
df3 <- all_output(system.file("example_batch", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "genotype_counts", generation = 10)
df4 <- all_output(system.file("example_batch", "", package = "demonanalysis", mustWork = TRUE), 
df_type = "driver_genotype_counts", generation = 10)
num_parameters <- count_parameters(system.file("example_batch", "", 
package = "demonanalysis", mustWork = TRUE))
plot_all_charts(list(df1, df2, df3, df4), num_parameters = num_parameters)

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