mkatari-bioinformatics-august-2013-deseq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
mkatari-bioinformatics-august-2013-deseq [2013/08/23 14:41] – mkatari | mkatari-bioinformatics-august-2013-deseq [2013/08/23 15:46] – mkatari | ||
---|---|---|---|
Line 1: | Line 1: | ||
[[mkatari-bioinformatics-august-2013|Back to Manny' | [[mkatari-bioinformatics-august-2013|Back to Manny' | ||
- | Here we will discuss how to create an R script that can be executed on HPC. Majority of the script is the same except | + | Here we will discuss how to create an R script |
If you are going to run DESeq in R on your desktop you will have to make sure DESeq is already installed. | If you are going to run DESeq in R on your desktop you will have to make sure DESeq is already installed. | ||
- | In order to install DESeq type the following: | + | In order to install DESeq type the following: |
< | < | ||
Line 11: | Line 11: | ||
</ | </ | ||
- | However | + | However |
< | < | ||
Line 24: | Line 24: | ||
</ | </ | ||
- | Now for our script we will use a command | + | Now in our script we will use a function (commandArgs) |
< | < | ||
Line 33: | Line 33: | ||
</ | </ | ||
+ | This will save all the words as a character vector in userargs. The value TRUE in the commandArgs argument make sure only the trailing arguments are saved. If the value is FALSE you will see additional R arguments when the command Rscript is executed. Notice the order of arguments is important. First we will provide the path to the count data file, then the path to the file containing the experimental design and finally the path to the directory where to save the results. | ||
- | The input for DESeq is a matrix/ | + | An example |
- | You have to first load the file into your workspace. | + | First we will load the count data file. |
- | + | ||
- | If you are running it locally | + | |
< | < | ||
- | counts = read.table(" | + | counts = read.table(pathToCountsData, header=T, row.names=1) |
</ | </ | ||
- | If you are writing a script | ||
- | counts = read.table(pathToCountsData, | ||
#This is simply meta-data to store information about the samples. | #This is simply meta-data to store information about the samples. |
mkatari-bioinformatics-august-2013-deseq.txt · Last modified: 2015/08/21 14:13 by mkatari