Hi, all!
I'm troubling in subsetting DESeqDataSet by a list of genes, and I got an 'index out of bounds' error.
Following is the code I used.
> skeletal_muscle <- scan("GTEx_Skeletal_Muscle2.csv", what = "", quiet = TRUE)
> skeletal_muscle[1:10]
[1] "ACADVL" "ACTA1" "ACTN2" "ALDOA" "ATP1A2" "ATP2A1" "ATP2A2" "ATP5B" "BIN1" "CA3"
> dds[skeletal_muscle[1:10],]
Error in .SummarizedExperiment.charbound(i, rownames(x), fmt) :
<DESeqDataSet>[i,] index out of bounds: ACADVL ACTA1 ... BIN1 CA3
I tested with another list of genes, and it worked well.
> de <- rownames(res[res$padj<0.05 & !is.na(res$padj), ])
> de[1:10]
[1] "0610007N19Rik" "0610009L18Rik" "0610010F05Rik" "0610030E20Rik" "0610039K10Rik"
[6] "0610040B10Rik" "1110004F10Rik" "1110007C09Rik" "1110008F13Rik" "1110008L16Rik"
> dds[de[1:10],]
class: DESeqDataSet
dim: 10 99
metadata(1): version
assays(6): counts mu ... replaceCounts replaceCooks
rownames(10): 0610007N19Rik 0610009L18Rik ... 1110008F13Rik 1110008L16Rik
rowData names(59): baseMean baseVar ... maxCooks replace
colnames(99): HD_Muscle_14w_F_1 HD_Muscle_14w_F_2 ... WT_PBMC_2m_4 WT_PBMC_2m_5
colData names(3): conds sizeFactor replaceable
Both lists look the same, but only later one works.
What could be the problem here?
Thank you, all!
deseq