Open UriaMorP opened 5 years ago
Hi,
I've updated the package on Github to include the fitted model in the output of metalonda and metalondaAll.
First, download/install the latest development code of MetaLonDA (v1.1.5) from GitHub:
library(devtools)
install_github("aametwally/MetaLonDA", ref = "master")
Follow instructions on README file to run MetaLonDA. For example, if you run it on one feature as in:
output.metalonda.f5 = metalonda(Count = metalonda_test_data[5,], Time = Time, Group = Group,
ID = ID, n.perm = 100, fit.method = "nbinomial", points = points,
text = rownames(metalonda_test_data)[5], parall = FALSE, pvalue.threshold = 0.05,
adjust.method = "BH", time.unit = "days", ylabel = "Normalized Count",
col = c("black", "green"), prefix = "Test_F5")
All details about the fitted model can be extracted from "output.metalonda.f5$model". The estimated points of each group are saved in data frames dd.0 and dd.1. So, you can access them through
output.metalonda.f5$model$dd.0
output.metalonda.f5$model$dd.1
Similarly for metalondaAll example:
output.metalonda.all = metalondaAll(Count = metalonda_test_data, Time = Time, Group = Group,
ID = ID, n.perm = 100, fit.method = "nbinomial", num.intervals = 100,
parall = FALSE, pvalue.threshold = 0.05, adjust.method = "BH",
time.unit ="hours",
norm.method = "none", prefix = "Test_metalondaALL", ylabel = "Read Counts",
col = c("black", "green"))
You can access the estimated points from first feature's model using:
output.metalonda.all$output.model[[1]]$dd.0
output.metalonda.all$output.model[[1]]$dd.1
Moreover, in this updated MetaLoDA version, all internal calculations are exported in .RData format so they can be accessed later on.
please let me know if I can be of any further help.
Thanks for the quick response! I'll follow your instructions and give an update!
Hey @aametwally , Sorry for the delayed answer! It works perfectly. Another (unrelated) issue I noticed is that now, in the CurveFit_nbinomial.jpg files, the curve for actual data and the ones for fitted values have the same transparency value so they cannot be distinguished.
Thanks, Uria
Wonderful!
Regarding the fitted spline figure, I'll be adding this enhancement to the next version, which should be released in less than a month.
Thanks,
Hey, I wish to get the output of metalondaAll in some data-structure (especially the curve fits) so I can later plot it myself using other frameworks. I saw that metalondaAll only saves jpg files, so I tried to call curveFittig myself. I got strange errors and when tried to follow the exact snippet as in the vignette I get the same:
Obviously, the curveFitting function works when called from within metalondaAll, and again, my only wish is to have the data points for the fitted curve and the normalized data in a nice dataframe so I can plot these myself. Can I get some help with that?
My sessionInfo:
Thanks!