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
f7f43b06
Commit
f7f43b06
authored
3 years ago
by
Arnaud Duvermy
Browse files
Options
Downloads
Patches
Plain Diff
Delete main.R
parent
76f39f6f
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
src/main.R
+0
-90
0 additions, 90 deletions
src/main.R
with
0 additions
and
90 deletions
src/main.R
deleted
100644 → 0
+
0
−
90
View file @
76f39f6f
############################# PCKGE REQUIRED ##############################
library
(
DESeq2
)
library
(
ggplot2
)
library
(
tydiverse
)
### maybe others ###
########################## change your home path ##########################
setwd
(
"mydatalocal/counts_simulation/src"
)
# fix seed
set.seed
(
123
)
########################## IMPORT FUN ################################
## simulation functions
source
(
"simulators.R"
)
#visualization function
source
(
"visualization_fun.R"
)
########################## INPUT PARAMS #####################################
N_cond
=
2
N_gene
=
6000
n_rep_sim
=
seq
(
2
,
5
,
by
=
1
)
### number of replicate to assessed
############################ MU effect #######################################
mu_simul_dtf_res
<-
data.frame
()
for
(
N_rep
in
n_rep_sim
){
mu_simul
=
seq
(
2500
,
12000
,
by
=
200
)
#mu_simul
#mu_simul <- rep.int(1500, 8)
res_simul
<-
mu_effect
(
alpha
=
2
,
mu_simul
)
res_simul
$
N_rep
<-
N_rep
tmp_reshape_res_simul
<-
res_simul
%>%
reshape2
::
melt
(
.
,
id
=
c
(
"vec_of_mu"
,
"N_rep"
))
mu_simul_dtf_res
<-
rbind
(
mu_simul_dtf_res
,
tmp_reshape_res_simul
)
}
###### LOG transform #######
# -> SEE linearity of var observed & mu
#mu_simul_dtf_res$value[mu_simul_dtf_res$variable=="var_observ"]<-log(mu_simul_dtf_res$value[mu_simul_dtf_res$variable=="var_observ"])
#mu_simul_dtf_res$vec_of_mu <- log(mu_simul_dtf_res$vec_of_mu)
###### Visualization ######
figure_mu_effect
<-
mu_effect_visualization
(
mu_simul_dtf_res
)
figure_mu_effect
########################### ALPHA effect ####################################
n_rep_sim
=
seq
(
2
,
5
,
by
=
1
)
alpha_simul_dtf_res
<-
data.frame
()
for
(
N_rep
in
n_rep_sim
){
alpha_simul
=
seq
(
0.2
,
7
,
by
=
0.2
)
alpha_simul
res_simul
<-
size_effect
(
mu
=
10000
,
alpha_simul
)
res_simul
$
N_rep
<-
N_rep
tmp_reshape_res_simul
<-
res_simul
%>%
reshape2
::
melt
(
.
,
id
=
c
(
"vec_of_alpha"
,
"N_rep"
))
alpha_simul_dtf_res
<-
rbind
(
alpha_simul_dtf_res
,
tmp_reshape_res_simul
)
}
###### Visualization ######
alpha_simul_dtf_res
figure_alpha_effect
<-
size_effect_visualization
(
alpha_simul_dtf_res
)
figure_alpha_effect
########################### EXPORT RESULTS #################################
svg
(
"mydatalocal/counts_simulation/img/fig_mu_effect.svg"
)
figure_mu_effect
dev.off
()
svg
(
"mydatalocal/counts_simulation/img/fig_size_effect.svg"
)
figure_alpha_effect
dev.off
()
########################### bETA TEST #####################################
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