RUVSeq and DESeq2 -- all variables in design formula must be columns in colData
1
0
Entering edit mode
garbuzov • 0
@garbuzov-20174
Last seen 16 months ago
United States

I'm interested in removing variation in my data using RUVseq. I'm following the tutorial/vignette and was able to generate the estimated factors of unwanted variation using the RUVg function. Now I want to incorporate them into my differential expression analysis using DESeq2.

Here is what I have:

set_NHP_RUVg <- RUVg(set_NHP, empirical, k=1)
pData(set_NHP_RUVg)
       key_IP_mf.Treatment        W_1
1M_IP                Day03 -0.2389338
2M_IP                Day03  0.3677343
3M_IP                Day03 -0.1828536
4M_IP                Day10 -0.2924691
5M_IP                Day10  0.3641969
6M_IP            Uninjured -0.3050515
7M_IP                Day20  0.1791624
8M_IP                Day20  0.3791267
9M_IP            Uninjured  0.3179415
11M_IP               Day20 -0.3741618
12M_IP           Uninjured -0.2146920

dds_RUVg <- DESeqDataSetFromMatrix(countData = counts(set_NHP_RUVg),
                              colData = pData(set_NHP_RUVg),
                              design = ~ W_1 + key_IP_mf$Treatment)

Error in DESeqDataSet(se, design = design, ignoreRank) : all variables in design formula must be columns in colData

But the two elements of my design are the two columns in my colData:


pData(set_NHP_RUVg)
       key_IP_mf.Treatment        W_1
1M_IP                Day03 -0.2389338
2M_IP                Day03  0.3677343
3M_IP                Day03 -0.1828536
4M_IP                Day10 -0.2924691
5M_IP                Day10  0.3641969
6M_IP            Uninjured -0.3050515
7M_IP                Day20  0.1791624
8M_IP                Day20  0.3791267
9M_IP            Uninjured  0.3179415
11M_IP               Day20 -0.3741618
12M_IP           Uninjured -0.2146920

sessionInfo( )
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6.2

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] DESeq2_1.38.3               RColorBrewer_1.1-3          zebrafishRNASeq_1.18.0      RUVSeq_1.32.0              
 [5] edgeR_3.40.2                limma_3.54.2                EDASeq_2.32.0               ShortRead_1.56.1           
 [9] GenomicAlignments_1.34.1    SummarizedExperiment_1.28.0 MatrixGenerics_1.10.0       matrixStats_0.63.0         
[13] Rsamtools_2.14.0            GenomicRanges_1.50.2        Biostrings_2.66.0           GenomeInfoDb_1.34.9        
[17] XVector_0.38.0              IRanges_2.32.0              S4Vectors_0.36.2            BiocParallel_1.32.6        
[21] Biobase_2.58.0              BiocGenerics_0.44.0

I'm just missing something. But I'm also following the vignette exactly.

DESeq2 RNAseq RUVSeq • 1.3k views
ADD COMMENT
1
Entering edit mode
helucro ▴ 70
@crowellh-11823
Last seen 5 months ago
University of Zurich, Switzerland

Not familiar with the package, but why the …$Treament in the formula when it’s key_IP_mf.Treatment?

ADD COMMENT
0
Entering edit mode

Thanks! That was it... why did I think they were equivalent?

ADD REPLY

Login before adding your answer.

Traffic: 815 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6