View source: R/meandifference.R
meandifference | R Documentation |
This function calculates the mean values, mean Fx (ECDF) and ECDF differences (Fx) for expression data, across different experimental conditions. If only one condition is provided, skips computation of mean differences.
meandifference(resultsecdf, expdf, nbwindows, showtime = FALSE,
verbose = TRUE)
resultsecdf |
A data frame containing ECDF results for each transcript and condition (see genesECDF). |
expdf |
A data frame containing experiment data that should have columns named 'condition', 'replicate', 'strand', and 'path'. |
nbwindows |
An integer representing the number of windows (or segments) in each transcript. |
showtime |
A logical value indicating if the duration of the function
processing should be indicated before ending. Defaults to
|
verbose |
A logical flag indicating whether to print progress messages.
Defaults to |
A data frame that contains, for each condition:
Mean values for the "value" and "Fx" columns (e.g.,
mean_value_ctrl
, mean_Fx_ctrl
).
Differences between the Fx
column and coordinate ratios
(e.g., diff_Fx_ctrl
).
If only one condition is provided, the differences on mean columns are not performed.
exppath <- system.file("extdata", "exptab.csv", package="tepr")
transpath <- system.file("extdata", "cugusi_6.tsv", package="tepr")
expthres <- 0.1
## Calculating necessary results
expdf <- read.csv(exppath)
transdf <- read.delim(transpath, header = FALSE)
avfilt <- averageandfilterexprs(expdf, transdf, expthres,
showtime = FALSE, verbose = FALSE)
countna <- countna(avfilt, expdf, nbcpu = 1, verbose = FALSE)
ecdf <- genesECDF(avfilt, expdf, verbose = FALSE)
resecdf <- ecdf[[1]]
nbwindows <- ecdf[[2]]
## Testing meandifference
meandifftest <- meandifference(resecdf, expdf, nbwindows,
verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.