Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HTRfit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
yvertlab
evolution_plasticity
plasticity_mutation
HTRfit
Commits
3c379836
Commit
3c379836
authored
1 year ago
by
Arnaud Duvermy
Browse files
Options
Downloads
Patches
Plain Diff
modif order params
parent
8136521a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/simulationreport.R
+7
-6
7 additions, 6 deletions
R/simulationreport.R
with
7 additions
and
6 deletions
R/simulationreport.R
+
7
−
6
View file @
3c379836
...
...
@@ -68,15 +68,15 @@ getGrobTable <- function(df){
#'
#' @param mock_obj A list containing simulation data and ground truth.
#' @param list_tmb A list of model results.
#' @param dds_obj a DESeq2 object
#' @param coeff_threshold A threshold for comparing estimates.
#' @param alt_hypothesis The alternative hypothesis for comparisons ("greater", "less", "greaterAbs").
#' @param report_file File name to save the generated report. If NULL, the report will not be exported.
#' @param dds_obj a DESeq2 object
#' @importFrom ggplot2 aes geom_point geom_abline facet_wrap theme_bw ggtitle
#' @return A list containing settings, plots, and evaluation results.
#' @export
simulationReport
<-
function
(
mock_obj
,
list_tmb
=
NULL
,
dds_obj
=
NULL
,
coeff_threshold
=
0
,
alt_hypothesis
=
"greaterAbs"
,
report_file
=
NULL
){
simulationReport
<-
function
(
mock_obj
,
list_tmb
=
NULL
,
coeff_threshold
=
0
,
alt_hypothesis
=
"greaterAbs"
,
report_file
=
NULL
,
dds_obj
=
NULL
){
#-- init
TMB_comparison_df
<-
data.frame
()
...
...
@@ -111,12 +111,13 @@ simulationReport <- function(mock_obj, list_tmb = NULL, dds_obj = NULL ,
comparison_df
<-
rbind
(
DESEQ_comparison_df
,
TMB_comparison_df
)
color2use
<-
c
(
"#D2B4DE"
,
"#A2D9CE"
)
color2use
<-
color2use
[
c
(
!
is.null
(
list_tmb
),
!
is.null
(
dds_obj
))]
#color2use <- c("#D2B4DE", "#A2D9CE")
color2use
<-
c
(
"#500472"
,
"#79cbb8"
)
color2use
<-
color2use
[
c
(
!
is.null
(
dds_obj
),
!
is.null
(
list_tmb
))]
# -- plotting
roc_curve
<-
roc_plot
(
comparison_df
,
col
=
"from"
)
+
ggplot2
::
scale_color_manual
(
values
=
color2use
)
id_plot
<-
identity_plot
(
comparison_df
,
col
=
"from"
)
+
ggplot2
::
scale_color_manual
(
values
=
color2use
)
id_plot
<-
identity_plot
(
comparison_df
,
col
=
"from"
,
pch
=
"from"
)
+
ggplot2
::
scale_color_manual
(
values
=
color2use
)
#metrics_plot <- metrics_plot(list_tmb)
evalDisp
<-
evaluateDispersion
(
TMB_dispersion_df
,
DESEQ_dispersion_df
,
color2use
)
dispersion_plot
<-
evalDisp
$
disp_plot
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment