DESeq2: error while ploting figure
1
0
Entering edit mode
@f68bdf4c
Last seen 16 months ago
Norway

I am trying to plot PCA, but getting error:

>dds <- DESeqDataSetFromMatrix(countData=rawCounts_total, 
                              colData=mapping_file, 
                              design=~Sample_Type, tidy = TRUE)

>dds <- DESeq(dds, parallel = T)
>rld <- vst(dds, fitType='mean', blind=TRUE)
>DESeq2::plotPCA(rld, intgroup=c("Sample_Type"))
Error in .local(object, ...) : unused argument (intgroup = "Sample_Type")


> plotPCA(rld, intgroup=colnames(colData(rld))[4])
Error in .local(object, ...) : unused argument (intgroup = "Sample_Type")

Any suggestions?

R DESeq2 • 1.4k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

Try running this code with no extra packages loaded (e.g. including ones that may be auto-loading from customized Rprofile...), and just using the code above. Also report your sessionInfo and any other messages that may give a clue as to what may be happening.

ADD COMMENT
0
Entering edit mode

If I work on a new R, then above commands worked, but I still donĀ“t understand, why it was not working on my previous Rprofile. Here is the sessionInfo:

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.2

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BiocParallel_1.26.2         DESeq2_1.32.0               SummarizedExperiment_1.22.0 Biobase_2.52.0             
 [5] MatrixGenerics_1.4.3        matrixStats_0.61.0          GenomicRanges_1.44.0        GenomeInfoDb_1.28.4        
 [9] IRanges_2.26.0              S4Vectors_0.30.2            BiocGenerics_0.38.0        

loaded via a namespace (and not attached):
 [1] bitops_1.0-7                bit64_4.0.5                 RColorBrewer_1.1-2          httr_1.4.2                 
 [5] syntactic_0.5.0             tools_4.1.1                 utf8_1.2.2                  R6_2.5.1                   
 [9] AcidGenerics_0.5.20         DBI_1.1.1                   colorspace_2.0-2            withr_2.4.2                
[13] tidyselect_1.1.1            processx_3.5.2              bit_4.0.4                   compiler_4.1.1             
[17] AcidExperiment_0.2.2        AcidSingleCell_0.1.9        basejump_0.14.23            cli_3.0.1                  
[21] DelayedArray_0.18.0         scales_1.1.1                genefilter_1.74.1           stringr_1.4.0              
[25] AcidMarkdown_0.1.4          XVector_0.32.0              pkgconfig_2.0.3             sessioninfo_1.1.1          
[29] AcidPlyr_0.1.22             fastmap_1.1.0               DESeqAnalysis_0.4.4         rlang_0.4.12               
[33] AcidPlots_0.3.9             rstudioapi_0.13             RSQLite_2.2.8               generics_0.1.0             
[37] dplyr_1.0.7                 RCurl_1.98-1.5              magrittr_2.0.1              GenomeInfoDbData_1.2.6     
[41] Matrix_1.3-4                Rcpp_1.0.7                  munsell_0.5.0               fansi_0.5.0                
[45] lifecycle_1.0.1             stringi_1.7.5               MASS_7.3-54                 zlibbioc_1.38.0            
[49] goalie_0.5.5                grid_4.1.1                  blob_1.2.2                  crayon_1.4.1               
[53] AcidCLI_0.1.7               lattice_0.20-45             Biostrings_2.60.2           cowplot_1.1.1              
[57] splines_4.1.1               annotate_1.70.0             KEGGREST_1.32.0             locfit_1.5-9.4             
[61] pipette_0.7.2               knitr_1.36                  ps_1.6.0                    pillar_1.6.4               
[65] AcidGenomes_0.2.19          geneplotter_1.70.0          AcidBase_0.4.5              XML_3.99-0.8               
[69] glue_1.4.2                  data.table_1.14.2           png_0.1-7                   vctrs_0.3.8                
[73] gtable_0.3.0                purrr_0.3.4                 assertthat_0.2.1            cachem_1.0.6               
[77] ggplot2_3.3.5               xfun_0.27                   xtable_1.8-4                survival_3.2-13            
[81] SingleCellExperiment_1.14.1 tibble_3.1.5                glmpca_0.2.0                AnnotationDbi_1.54.1       
ADD REPLY
0
Entering edit mode

It sounds like another package may have done something... not sure though.

ADD REPLY
0
Entering edit mode

For PCA plot, can we do ANOVA on a group, let's say, if we find any cluster, but want to check whether it's significant or not?

ADD REPLY
0
Entering edit mode

We don't have any tests for differences in the reduced dimensional space after using the data also to perform clustering. Single cell methods may help you here. Daniella Witten has worked on this recently

ADD REPLY

Login before adding your answer.

Traffic: 634 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