Skip to content
Snippets Groups Projects
Commit 7bd21759 authored by Arnaud Duvermy's avatar Arnaud Duvermy
Browse files

update readme

parent 5065993b
Branches
Tags
No related merge requests found
......@@ -18,7 +18,7 @@ Furthermore, by enabling the inclusion of fixed effects, mixed effects, and inte
#### method A:
To install the latest version of HTRfit, run the following in your R console :
```
```r
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::install_git("https://gitbio.ens-lyon.fr/aduvermy/HTRfit")
......@@ -28,7 +28,7 @@ remotes::install_git("https://gitbio.ens-lyon.fr/aduvermy/HTRfit")
You also have the option to download a release directly from the [HTRfit release page](https://gitbio.ens-lyon.fr/aduvermy/HTRfit/-/tags). Once you've downloaded the release, simply launch following command.
```
```r
## -- Example using the HTRfit-v2.0.0 release
install.packages('HTRfit-v2.0.0.tar.gz', repos = NULL, type='source')
......@@ -41,7 +41,7 @@ When dependencies are met, installation should take a few minutes.
The following depandencies are required:
```
```r
## -- required
install.packages(c('parallel', 'data.table', 'ggplot2', 'gridExtra', 'glmmTMB', 'magrittr', 'MASS', 'reshape2', 'rlang', 'stats', 'utils', 'BiocManager', 'car'))
BiocManager::install('S4Vectors', update = FALSE)
......@@ -53,14 +53,14 @@ BiocManager::install('DESeq2', update = FALSE)
We have developed [Docker images](https://hub.docker.com/r/ruanad/htrfit/tags) to simplify the package's utilization.
```
```sh
docker pull ruanad/htrfit:v2.0.0-beta
docker run -it --rm ruanad/htrfit:v2.0.0-beta
```
HTRfit allows building graphs to visualize results. Inside Docker, displaying a window from the R terminal can be tricky and requires specific settings before running the container. Following commands worked for us:
```
```sh
# Prepare target env
CONTAINER_DISPLAY="0"
CONTAINER_HOSTNAME="htrfit_user"
......@@ -111,7 +111,7 @@ In the realm of RNAseq analysis, various key experimental parameters play a cruc
### Init a design and simulate RNAseq data
```
```r
library('HTRfit')
## -- init a design
input_var_list <- init_variable( name = "varA", mu = 0, sd = 0.29, level = 2000) %>%
......@@ -128,7 +128,7 @@ mock_data <- mock_rnaseq(input_var_list,
### Fit your model
```
```r
## -- prepare data & fit a model with mixed effect
data2fit = prepareData2fit(countMatrix = mock_data$counts,
metadata = mock_data$metadata,
......@@ -148,7 +148,7 @@ The `fitModelParallel()` function in **HTRfit** provides a powerful way to fit m
The `diagnostic_plot()` function allows to plot a diagnostic plot of AIC (Akaike Information Criterion), BIC (Bayesian Information Criterion), logLik (log-likelihood), deviance, df.resid (residual degrees of freedom), and dispersion. These metrics provide insights into how well the model fits the data and help in comparing different models. By examining these metrics, users can quickly identify any anomalies or potential issues in the fitting process.
```
```r
## -- plot all metrics
p <- diagnostic_plot(list_tmb = l_tmb)
```
......@@ -163,14 +163,14 @@ The diagnostic metrics show that the fit is not as good for all genes.
The tidy_results function extracts a dataframe containing estimates of ln(fold changes), standard errors, test statistics, p-values, and adjusted p-values for fixed effects. Additionally, it provides access to correlation terms and standard deviations for random effects, offering a detailed view of HTRfit modeling results.
```
```r
## -- get tidy results
tidy_res <- tidy_results(l_tmb, coeff_threshold = 0.1, alternative_hypothesis = "greater")
```
### Evaluation
```
```r
## -- evaluation
resSimu <- evaluation_report(list_tmb = l_tmb,
mock_obj = mock_data,
......@@ -193,7 +193,7 @@ All metrics are computed for each parameter (excluding the intercept when skip_e
```{r}
```r
## -- init a design
input_var_list <- init_variable( name = "varA", mu = 0, sd = 0.29, level = 2) %>%
init_variable( name = "varB", mu = 0.27, sd = 0.6, level = 2) %>%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment