do_elbow: calculates the upper and lower elbow cut-off fold-values

Description Usage Arguments Value Examples

Description

calculates the upper and lower elbow cut-off fold-values

Usage

1
  do_elbow(fold_values)

Arguments

fold_values

a data.frame containing all of the fold values to calculate the elbow for.

Value

a list containing the following:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# read in the EcoliMutMA sample data from the package
		data(EcoliMutMA, package="ELBOW")
		csv_data <- EcoliMutMA
		# - OR - Read in a CSV file (uncomment - remove the #'s
		#        - from the line below and replace 'filename' with
		#        the CSV file's filename)
		# csv_data <- read.csv(filename)

		# set the number of initial and final condition replicates both to three
		init_count  <- 3
		final_count <- 3

		# Parse the probes, intial conditions and final conditions
		# out of the CSV file.  Please see: extract_working_sets
		# for more information.
		#
		# init_count should be the number of columns associated with
		#       the initial conditions of the experiment.
		# final_count should be the number of columns associated with
		#       the final conditions of the experiment.
		working_sets <- extract_working_sets(csv_data, init_count, final_count)

		probes <- working_sets[[1]]
		initial_conditions <- working_sets[[2]]
		final_conditions <- working_sets[[3]]

		# Uncomment to output the plot to a PNG file (optional)
		# png(file="output_plot.png")

		my_data <- replicates_to_fold(probes, initial_conditions, final_conditions)

		# compute the elbow for the dataset
		limits <- do_elbow(data.frame(my_data$fold))

Example output

[1] "rowsums"
[1] "fold"
[1]  0.06873333 -0.08933333  0.34013333  0.19313333  0.00940000 -0.02596667
[1] "bound data"
    ID_REF        fold
1 1001_115  0.06873333
2  1002_33 -0.08933333
3 1003_942  0.34013333
4 1004_552  0.19313333
5 1005_657  0.00940000
6 1006_393 -0.02596667
[1] "firsta_data"
    ID_REF        fold
1 1001_115  0.06873333
2  1002_33 -0.08933333
3 1003_942  0.34013333
4 1004_552  0.19313333
5 1005_657  0.00940000
6 1006_393 -0.02596667
[1] "sorted"
[1] "headers"

ELBOW documentation built on Nov. 8, 2020, 8:14 p.m.