annotate i_adhore_configure.Rmd @ 0:9755ce6ac4d5 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
author mingchen0919
date Tue, 08 Aug 2017 12:53:57 -0400
parents
children dab02b629d48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
1 ---
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
2 title: 'i-adhore: generate i-adhore config file'
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
3 output:
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
4 html_document:
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
5 number_sections: true
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
6 toc: true
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
7 theme: cosmo
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
8 highlight: tango
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
9 ---
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
10
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
11 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
12 knitr::opts_chunk$set(echo = ECHO)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
13 ```
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
14
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
15 # Genomes and analysis files
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
16
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
17 ```{r}
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
18 g_analysis_files_set = strsplit(opt$g_analysis_file, ';')[[1]]
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
19 g_analysis_files_list = list()
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
20 # for(i in g_analysis_files_set) {
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
21 # genome = strsplit(i, ':')[[1]][1]
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
22 # analysis_files = strsplit(i, ':')[[1]][2] %>%
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
23 # strsplit(',') %>% `[[`(1) %>%
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
24 # (function(x){
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
25 # paste0(1:length(x),' ', x)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
26 # })
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
27 # g_analysis_files_list[[genome]] = analysis_files
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
28 # }
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
29 for(i in g_analysis_files_set) {
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
30 genome = strsplit(i, ':')[[1]][1]
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
31 analysis_files = strsplit(i, ':')[[1]][2] %>%
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
32 strsplit(',') %>% `[[`(1) %>%
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
33 laply(.fun = function(x){
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
34 file_name = strsplit(x, '/')[[1]] %>% tail(1)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
35 file_name = strsplit(file_name, '\\.')[[1]][1]
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
36 paste0(file_name, ' ', x)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
37 })
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
38 g_analysis_files_list[[genome]] = c(
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
39 'name' = paste0('genome=', strsplit(i, ':')[[1]][1]),
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
40 'analysis_files' = analysis_files
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
41 )
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
42 print(paste0('genome=', strsplit(i, ':')[[1]][1]))
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
43 print(analysis_files)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
44 }
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
45 ```
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
46
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
47 # Other parameters
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
48
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
49 ```{r}
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
50 params = c(
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
51 'blast table' = opt$blast_table,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
52 'output_path' = opt$i_adhore_configure_dir,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
53 'gap_size' = opt$gap_size,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
54 'cluster_gap' = opt$cluster_gap,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
55 'q_value' = opt$q_value,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
56 'prob_cutoff' = opt$prob_cutoff,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
57 'anchor_points' = opt$anchor_points,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
58 'level_2_only' = opt$level2only,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
59 'table_type' = opt$table_type,
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
60 'multi_hypothesis_correction' = opt$multi_hypothesis_correction
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
61 )
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
62
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
63 df = data.frame(name = names(params),
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
64 value = params)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
65 knitr::kable(df)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
66 ```
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
67
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
68
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
69 ```{r echo=FALSE}
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
70 # generate i_adhore_configure.txt file
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
71 lines = c(unlist(g_analysis_files_list),
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
72 ' ',
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
73 paste0(df$name, '=', df$value),
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
74 'CompareAligners')
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
75 fileConn = file('I_ADHORE_CONFIGURE_TXT')
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
76 writeLines(lines, con = fileConn)
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
77 ```
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
78
9755ce6ac4d5 planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_i_adhore commit b6ef011f29d6c75775be9cc0e0abe53e19981d1d-dirty
mingchen0919
parents:
diff changeset
79