Skip to content

Commit 936fed9

Browse files
committed
update before more serious tests
1 parent 451f61a commit 936fed9

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

data/d_zibb_4.RData

96 Bytes
Binary file not shown.

inst/scripts/d_zibb_4.R

+9-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ data {
2121
array [N_sample] int N; // repertoire size
2222
array [N_individual] int condition_id; // id of conditions
2323
array [N_sample] int individual_id; // id of replicate
24-
vector [N_gene] alpha;
2524
real <lower=0> phi;
2625
real <lower=0, upper=1> kappa;
2726
array [N_condition] vector [N_gene] beta_condition;
@@ -31,13 +30,17 @@ data {
3130
}
3231
3332
generated quantities {
33+
vector [N_gene] alpha;
3434
array [N_sample] vector <lower=0, upper=1> [N_gene] theta;
3535
array [N_sample] vector [N_gene] beta_sample;
3636
array [N_individual] vector [N_gene] beta_individual;
37-
3837
// generate usage
3938
array [N_gene, N_sample] int Y;
4039
40+
for(i in 1:N_gene) {
41+
alpha[i] = normal_rng(-3, 3);
42+
}
43+
4144
for(i in 1:N_individual) {
4245
for(j in 1:N_gene) {
4346
beta_individual[i][j] = normal_rng(beta_condition[condition_id[i]][j], sigma_individual[condition_id[i]]);
@@ -88,8 +91,6 @@ N <- rep(x = 1000, times = N_sample)
8891

8992
individual_id <- rep(x = 1:N_individual, each = N_replicates)
9093

91-
alpha <- rnorm(n = N_gene, mean = -5, sd = 3)
92-
9394
phi <- 200
9495

9596
kappa <- 0.02
@@ -118,7 +119,6 @@ l <- list(N_sample = N_sample,
118119
N = N,
119120
condition_id = condition_id,
120121
individual_id = individual_id,
121-
alpha = alpha,
122122
phi = phi,
123123
kappa = kappa,
124124
beta_condition = beta_condition,
@@ -168,7 +168,11 @@ d_zibb_4 <- ysim_df
168168
save(d_zibb_4, file = "data/d_zibb_4.RData", compress = T)
169169

170170

171+
# save(sim, file = "mytests/sim_d_zibb_4.RData", compress = T)
171172
# ggplot(data = d_zibb_4)+
172173
# geom_sina(aes(x = gene_name, y = gene_usage_count, col = condition))+
173174
# theme_bw(base_size = 10)+
174175
# theme(legend.position = "none")
176+
177+
s <- data.frame(summary(sim)$summary)
178+
s$par <- rownames(s)

vignettes/User_Manual.Rmd

+16-2
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,22 @@ g2 <- ggplot(data = stats)+
548548
```
549549

550550

551-
# Case Study C: analyzing paired-IRRs
552-
Stub, to be continued ...
551+
<!-- # Case Study C: analyzing paired-IRRs -->
552+
<!-- Stub, to be continued ... -->
553+
554+
<!-- ```{r} -->
555+
<!-- M <- DGU(ud = d_zibb_2, # input data -->
556+
<!-- mcmc_warmup = 500, # how many MCMC warm-ups per chain (default: 500) -->
557+
<!-- mcmc_steps = 1500, # how many MCMC steps per chain (default: 1,500) -->
558+
<!-- mcmc_chains = 3, # how many MCMC chain to run (default: 4) -->
559+
<!-- mcmc_cores = 1, # how many PC cores to use? (e.g. parallel chains) -->
560+
<!-- hdi_lvl = 0.95, # highest density interval level (de fault: 0.95) -->
561+
<!-- adapt_delta = 0.8, # MCMC target acceptance rate (default: 0.95) -->
562+
<!-- max_treedepth = 10, # tree depth evaluated at each step (default: 12) -->
563+
<!-- paired = TRUE) -->
564+
<!-- ``` -->
565+
566+
553567

554568
# Session
555569

0 commit comments

Comments
 (0)