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

usess file

parent f8db1092
No related branches found
No related tags found
No related merge requests found
......@@ -68,3 +68,44 @@ library("dplyr")
example_2d_df <- as_tibble(example_3d_cube)
#}
#)
#params
N_gene = 6000
## function generator
rnbinom_generator <- function(n_gene, mu_simul, alpha){
my_counts <- rnbinom(n = n_gene, mu = mu_simul, size = alpha)
return(my_counts)
}
## build my lib counts
env1_A <- rnbinom_generator(N_gene, 50, 5)
env1_B <- rnbinom_generator(N_gene, 50, 5)
env2_A <- rnbinom_generator(N_gene, 100, 5)
env2_B <- rnbinom_generator(N_gene, 100, 5)
## export my lib count
names(env1_A) <- sprintf("gene%d", 1:N_gene)
names(env1_B) <- sprintf("gene%d", 1:N_gene)
names(env2_A) <- sprintf("gene%d", 1:N_gene)
names(env2_B) <- sprintf("gene%d", 1:N_gene)
env1_A %>% data.frame(.) %>% fwrite(., "~/mydatalocal/counts_simulation/results/env1_A.tsv", row.names = T, col.names = F, sep = "\t")
env2_A %>% data.frame(.) %>% fwrite(., "~/mydatalocal/counts_simulation/results/env2_A.tsv", row.names = T, col.names = F, sep = "\t")
env1_B %>% data.frame(.) %>% fwrite(., "~/mydatalocal/counts_simulation/results/env1_B.tsv", row.names = T, col.names = F, sep = "\t")
env2_B %>% data.frame(.) %>% fwrite(., "~/mydatalocal/counts_simulation/results/env2_B.tsv", row.names = T, col.names = F, sep = "\t")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment