estimate_log_fold_change.RdEstimates log fold change
# S4 method for Moanin estimate_log_fold_change( object, contrasts, method = c("timecourse", "sum", "max", "timely", "abs_sum", "abs_squared_sum", "min") )
| object | An object of class |
|---|---|
| contrasts | The contrasts to consider |
| method | method for calculating the log-fold change. See details. |
A data.frame giving the estimated log-fold change for each gene
(row). For all methods except for "timely", the data frame will consist of
one column for each value of the argument contrasts. For "timely"
there will be one column for each timepoint and contrast combination.
The following methods exist for calculating the log-fold change between conditions over time (default is "timecourse"):
timelyThe log-fold change for each individual timepoint
(\(lfc(t)\))
timecourseThe average absolute per-week fold-change,
multiplied by the sign of the average per-week fold-change.
sumSum of per-week log fold change, over all timepoints
maxMax of per-week log fold change, over all timepoints
abs_sumSum of the absolute value of the per-week log fold
change, over all timepoints
abs_squared_sumSum of the square value of the per-week log
fold change, over all timepoint
minMin of per-week log fold change, over all timepoints
If the user set log_transform=TRUE in the creation of the
Moanin object, the data will be log transformed before calculating
the fold-change.
data(exampleData) moanin <- create_moanin_model(data=testData,meta=testMeta) estsTimely <- estimate_log_fold_change(moanin, contrasts=c("K-C"), method="timely") head(estsTimely)#> K-C:0 K-C:3 K-C:6 K-C:9 K-C:12 #> NM_009912 0.006142387 -0.02249478 0.05159468 0.11439732 -0.06146186 #> NM_008725 -2.654785490 -0.27343865 0.68829245 -0.47188066 1.74633186 #> NM_007473 0.160362295 -0.10176553 -0.50795729 -0.05957733 -0.42501853 #> ENSMUST00000094955 -0.350591967 -0.64630114 -0.25647962 -0.35991022 -0.41771162 #> NM_001042489 -0.088974987 -0.23213806 0.18915007 -0.17861133 -0.33206436 #> NM_008159 0.386377015 -0.02983951 0.08627550 0.32663505 0.18930621 #> K-C:18 K-C:24 K-C:30 K-C:36 K-C:48 #> NM_009912 -0.02073242 -0.09083955 -0.3541720 -0.53331742 -1.277439619 #> NM_008725 0.08891687 -2.04306556 0.5988342 0.90478316 -1.985072414 #> NM_007473 -0.37838655 -0.10451264 -0.4244740 1.03998928 -0.210841392 #> ENSMUST00000094955 -0.43184782 -0.56349779 -0.4123224 -0.28054680 -0.005760532 #> NM_001042489 0.06765746 -0.10443410 -0.4429174 0.07642017 0.683764131 #> NM_008159 0.30017465 0.15285657 -0.5034323 -0.81198828 -1.029925872 #> K-C:60 K-C:72 K-C:120 K-C:168 #> NM_009912 -0.9508426 -1.3977873 -0.2928437 -0.86763035 #> NM_008725 2.4051843 -0.2778756 2.7361353 0.71780185 #> NM_007473 -0.9481227 -0.3388556 0.4967829 0.19739522 #> ENSMUST00000094955 0.1210526 0.3766247 0.2479095 0.50586716 #> NM_001042489 0.5895878 0.3821725 0.3287660 0.02832949 #> NM_008159 -1.1093377 -0.1279111 -0.3025480 -0.72920750estsTimecourse <- estimate_log_fold_change(moanin, contrasts=c("K-C"),method="timecourse") head(estsTimecourse)#> K-C #> NM_009912 -0.4315497 #> NM_008725 1.2565999 #> NM_007473 -0.3852887 #> ENSMUST00000094955 -0.3554588 #> NM_001042489 0.2660706 #> NM_008159 -0.4347011