|
0
|
1 ---
|
|
|
2 title: 'DESeq2 analysis'
|
|
|
3 output:
|
|
|
4 html_document:
|
|
|
5 number_sections: true
|
|
|
6 toc: true
|
|
|
7 theme: cosmo
|
|
|
8 highlight: tango
|
|
|
9 ---
|
|
|
10
|
|
|
11 ```{r setup, include=FALSE, warning=FALSE, message=FALSE}
|
|
|
12 knitr::opts_chunk$set(
|
|
|
13 echo = opt$echo,
|
|
|
14 error = TRUE
|
|
|
15 )
|
|
|
16 ```
|
|
|
17
|
|
|
18
|
|
1
|
19 # User input
|
|
0
|
20
|
|
1
|
21 ```{r 'user input'}
|
|
|
22 df = data.frame(name = names(opt)[-1],
|
|
|
23 value = unlist(opt))
|
|
|
24 datatable(df, rownames = FALSE)
|
|
0
|
25 ```
|
|
|
26
|
|
|
27
|
|
1
|
28 # Count Matrix
|
|
|
29
|
|
|
30 Display the first 100 rows of count data matrix.
|
|
|
31
|
|
|
32 ```{r 'count matrix'}
|
|
|
33 count_data = read.table(opt$count_data)
|
|
|
34 col_names = trimws(strsplit(opt$count_matrix_column_names, ',')[[1]])[1:ncol(count_data)]
|
|
|
35 col_names = col_names[!is.na(col_names)]
|
|
|
36 colnames(count_data)[1:length(col_names)] = col_names
|
|
|
37 datatable(head(count_data, 100))
|
|
|
38 ```
|
|
|
39
|
|
|
40 # Column Data
|
|
|
41
|
|
|
42 ```{r 'column data'}
|
|
|
43 col_data = read.table(opt$col_data,
|
|
|
44 stringsAsFactors = FALSE, sep=',', header = TRUE, row.names = 1)
|
|
|
45 datatable(col_data)
|
|
|
46 ```
|
|
|
47
|
|
|
48 # Match sample names
|
|
|
49
|
|
|
50 The goal of this step is to rearrange the rows of the column data matrix so that the samples rows in the count data matrix and the sample columns in the count data matrix are in the same order.
|
|
|
51
|
|
|
52 ```{r 'match sample names'}
|
|
|
53 col_data = col_data[col_names, ]
|
|
|
54 datatable(col_data)
|
|
|
55 ```
|
|
|
56
|