Description Usage Arguments Value
This function simulates an experiment by making changes to absolute copy numbers, using different probabilities of differential expression, of direction of change, and of what level of differential expression. It returns the copy numbers, relative TPMs, the real fold changes and perceived fold changes of the relative TPMs, as well as the consistency of these two fold changes. NOTE: this only supports two condition experiments at this time.
1 2 3 | generate_abs_changes(tpms = NULL, de_prob = 0.1, dir_prob = 0.5,
de_levels = c(1.25, 2, 4), de_type = "discrete", seed = 1,
num_reps = c(10, 10), min_tpm = 1)
|
tpms |
a vector of length equal to the number of targets. preferably named so that the results are tied to target names. |
de_prob |
a single value greater than 0 and less than 1 to denote the probability of an individual target having differential expression. This is referring to the expected percentage of all features that will be differentially expressed (DE). If min_tpm is set, then this probability will be adjusted to make sure that the number of DE features among the filtered features matches the expected proportion of DE for all features. |
dir_prob |
a single value greater than 0 and less than 1 to denote the probability of the differential expression being increased. |
de_levels |
a numeric vector of the different possible levels of differential expression (default has three: a 'small' change of 25%, a moderate change of 100% / 2-fold, and a 'large' change of 300% / 4-fold |
seed |
what the seed is for the random number generator, so that the results are reproducible |
num_reps |
an integer vector describing the number of replicates each condition will have. |
min_tpm |
the minimum transcripts per million that determines
which transcripts are expressed highly enough to be considered
as potentially differentially expressed. This helps avoid simulating
differential expression with low abundance transcripts. Note that this
does not necessarily correspond to low-abundance transcripts if considering
estimated counts. This can be set to |
a list with the following members:
abs_fold_changes: a vector of the absolute fold changes for each target
rel_fold_changes: a vector of the perceived relative fold changes for each target
consistent_changes: the consistency of fold changes as determined by
calculate_consistency
copy_numbers_per_cell: an N x 2 matrix of the expected copy numbers for each target in each condition
transcript_abundances: an N x 2 matrix of the expected relative TPMs for each target in each condition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.