I am trying to read the results in files called 'SRR11834853' and similar names with different numbers. I am using this script:
ppolSampleInfo = read.table("./RNAseq2/Workplace/1_raw/metadata2.txt",header=TRUE, fill = TRUE)
row.names(ppolSampleInfo) <- ppolSampleInfo$sampleName
head(ppolSampleInfo)
ddsHTSeq<-DESeqDataSetFromHTSeqCount(sampleTable= ppolSampleInfo, directory = "~/RNASeq2/Workplace/4_counts", design = ~ condition)
dds<-DESeq(ddsHTSeq)
and when I run the second last line it gives:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'Users/RNASeq2/Workplace/4_counts/male_adult_eyes': No such file or directory
The problem is that its looking for files (in the right place) with names from the wrong column of my metadata file, it should be looking at the column labelled 'sampleName', but it looks like it's looking at the column labelled 'fileName'
How do I change this?