Mercurial > repos > mingchen0919 > aurora_deseq2_site
comparison DESeq_01.Rmd @ 0:6f94b4b9de44 draft
planemo upload
author | mingchen0919 |
---|---|
date | Tue, 27 Feb 2018 23:57:53 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6f94b4b9de44 |
---|---|
1 --- | |
2 output: html_document | |
3 --- | |
4 | |
5 ```{r setup, include=FALSE, warning=FALSE, message=FALSE} | |
6 knitr::opts_chunk$set( | |
7 echo = as.logical(opt$X_e), | |
8 error = TRUE | |
9 ) | |
10 ``` | |
11 | |
12 # `DESeqDataSet` object | |
13 | |
14 ```{r 'DESeqDataSet object'} | |
15 count_file_paths = strsplit(opt$X_P, ',')[[1]] | |
16 count_file_names = strsplit(opt$X_N, ',')[[1]] | |
17 sample_table = read.table(opt$X_S, header = TRUE) | |
18 row.names(sample_table) = sample_table[,2] | |
19 sample_table = sample_table[count_file_names, ] | |
20 | |
21 ## copy count files into OUTPUT_DIR/counts | |
22 dir.create(paste0(OUTPUT_DIR, '/counts'), recursive = TRUE) | |
23 file_copy = file.copy(count_file_paths, paste0(OUTPUT_DIR, '/counts/', count_file_names), overwrite = TRUE) | |
24 | |
25 ## DESeqDataSet object | |
26 dds = DESeqDataSetFromHTSeqCount(sampleTable = sample_table, | |
27 directory = paste0(OUTPUT_DIR, '/counts'), | |
28 design = formula(opt$X_p)) | |
29 dds | |
30 ``` |