exclude_data_subset: Select a subset of count and target data based on metadata...

Description Usage Arguments Value See Also Examples

Description

This function, given count data and target metadata, will return a subset of both count and target data excluding data with values corresponding to selection parameters. For example, you can select count and target data to exclude only timepoint "day1". Multiple valid keep selections can also be used.

Usage

1
2
exclude_data_subset(counts, targets, target_count_id_map,
  target_exclude_col, target_exclude_val)

Arguments

counts

Count data as prepared with prep_counts().

targets

Target data as prepared with prep_targets().

target_count_id_map

Column in targets file whose values corresponds with count data column ids.

target_exclude_col

Column in target data to select values by. For instance, to exclude "day1" data from the "timepoint" column, this argument should be "timepoint".

target_exclude_val

Value from target_exclude_col to remove in the subset data. For instance, to select "day1" data from the "timepoint" column, this argument should be "day1". Multiple values can be selected by providing a concatenated set of values. I.E. To exclude day1 and day2 data, this argument should be, c("day1","day2").

Value

This function returns count and target data based on the target_exclude_col and target_exclude_val parameters. Counts will be returned as the [[1]] index and target data will be returned as the [[2]] index.

See Also

prep_counts, prep_targets, keep_data_subset

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
## Not run: 

myCounts <- prep_counts(count_input="master_count_data.txt", delim="t")
myTargets <- prep_targets(target_input="master_count_data.txt", delim="t")

#Get data for only "timepoint" at "day1".
data_subset <- exclude_data_subset(counts=myCounts, targets=myTargets,
                                  target_count_id_map="sample_id",
                                  target_exclude_col="timepoint",
                                  target_exclude_val="day1")

#Count data is stored in the first index returned by the function.
subset_counts <- data_subset[[1]]

#Target data is stored in the second index returned by the function.
subset_targets <- data_subset[[2]]


#Get data for only "timepoint" at "day1" and "day2".
data_subset <- exclude_data_subset(counts=myCounts, targets=myTargets,
                                  target_count_id_map="sample_id",
                                  target_exclude_col="timepoint",
                                  target_exclude_val=c("day1","day2"))

#Count data is stored in the first index returned by the function.
subset_counts <- data_subset[[1]]

#Target data is stored in the second index returned by the function.
subset_targets <- data_subset[[2]]


## End(Not run)

DEVis documentation built on May 2, 2019, 3:18 p.m.