Here is my new code chunk and this is the new error : "Error in file.path(directory, fn) : object 'directory' not found"
Sinorhizobium DESeq2
source("https://bioconductor.org/biocLite.R") Bioconductor version 3.6 (BiocInstaller 1.28.0), ?biocLite for help A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install biocLite("DESeq2") BioC_mirror: https://bioconductor.org Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.3 (2017-11-30). Installing package(s) ‘DESeq2’ trying URL 'https://bioconductor.org/packages/3.6/bioc/bin/macosx/el-capitan/contrib/3.4/DESeq2_1.18.1.tgz'
Content type 'application/x-gzip' length 3765534 bytes (3.6 MB)
downloaded 3.6 MB
The downloaded binary packages are in /var/folders/y9/4lq94xwx5_50p3s256r8flrm0000gn/T//RtmpiTFueL/downloaded_packages
library(DESeq2)
Set the working directory
setwd ("/Users/gabriellecorso/Desktop/Sinorhizobium/") getwd() [1] "/Users/gabriellecorso/Desktop/Sinorhizobium" list.files() [1] "PG99_PG98" "sort_trim_PG100_D1413_A.counts" [3] "sort_trim_PG100_D1413_B.counts" "sort_trim_PG100_D1413_C.counts" [5] "sort_trim_PG105_WT_A.counts" "sort_trim_PG105_WT_B.counts"
[7] "sort_trim_PG105_WT_C.counts"Set the prefix for each output file name
outputPrefix <- "Rhizobium_DESeq2"
sampleFiles<- c("sort_trim_PG100_D1413_A.counts","sort_trim_PG100_D1413_B.counts", + "sort_trim_PG100_D1413_C.counts", "sort_trim_PG105_WT_A.counts", "sort_trim_PG105_WT_B.counts","sort_trim_PG105_WT_C.counts")
mRNA profiles of
control group (WT), *
knockout group (PG100), *
sampleNames <- c("WT_A","WT_B","WT_C","PG100_A","PG100_B","PG100_C") sampleCondition <- c("control","control","control","PG100","PG100","PG100")
sampleTable <- data.frame(sampleName=sampleNames, + fileName=sampleFiles, + condition=sampleCondition)
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable=sampleTable, + directory=directory, + design=~condition) Error in file.path(directory, fn) : object 'directory' not found
Did you issue:
How did you load it? Any messages when you loaded it?
Yes- I have attached below. I also just updated my R studio to the most recent version (1.1.453).
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below: