enhancedVolcano: Why are only a few of my select labels showing up?
1
1
Entering edit mode
noahhelton98 ▴ 20
@noahhelton98-24397
Last seen 3.9 years ago

I have DESeq2 results and I want to label all of the genes that contain U12 introns in a volcano plot using enhancedVolcano.

I labeled the genes containing U12 introns by making a separate column (intron_type) where U12 == TRUE and U2 == FALSE, but when I run the enhancedvolcano, not all of my genes are showing up. Here is the code.

test$intron_type <- ifelse(test$transcript_id %in% U12$transcript_id, TRUE, FALSE)

my_list <- ifelse(test$log2FoldChange > 0.5 & test$padj < 0.05 & test$intron_type == TRUE, test$transcript_id, NA)
my_list <- my_list[!is.na(my_list)]
my_list

EnhancedVolcano(test, x = 'log2FoldChange', y = 'padj', lab = test$transcript_id,
                FCcutoff = 0, pCutoff = 10,
                labSize = 3,
                selectLab =  my_list, 
                drawConnectors = TRUE,
                arrowheads = FALSE)

I have also tried just copying and pasting the list of genes (c('enst1', 'enst2', etc. ) and it only labeled about 20/100 genes. Any help would be greatly appreciated. Thank you.

Sessioninfo

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.0          stringr_1.4.0          purrr_0.3.4            readr_1.4.0            tibble_3.0.4           tidyverse_1.3.0       
 [7] tidyr_1.1.2            dplyr_1.0.2            EnhancedVolcano_1.7.16 ggrepel_0.9.0          ggplot2_3.3.2.9000    

loaded via a namespace (and not attached):
  [1] ggbeeswarm_0.6.0            colorspace_1.4-1            ellipsis_0.3.1              rprojroot_1.3-2            
  [5] XVector_0.28.0              GenomicRanges_1.40.0        fs_1.5.0                    rstudioapi_0.11            
  [9] farver_2.0.3                bit64_4.0.5                 AnnotationDbi_1.50.3        fansi_0.4.1                
 [13] lubridate_1.7.9             xml2_1.3.2                  splines_4.0.3               extrafont_0.17             
 [17] geneplotter_1.66.0          knitr_1.30                  pkgload_1.1.0               jsonlite_1.7.1             
 [21] Rsamtools_2.4.0             broom_0.7.2                 Rttf2pt1_1.3.8              annotate_1.66.0            
 [25] dbplyr_1.4.4                compiler_4.0.3              httr_1.4.2                  backports_1.1.10           
 [29] assertthat_0.2.1            Matrix_1.2-18               cli_2.1.0                   htmltools_0.5.0            
 [33] tools_4.0.3                 gtable_0.3.0                glue_1.4.2                  GenomeInfoDbData_1.2.3     
 [37] maps_3.3.0                  tinytex_0.26                Rcpp_1.0.5                  Biobase_2.48.0             
 [41] cellranger_1.1.0            vctrs_0.3.4                 Biostrings_2.56.0           ggalt_0.4.0                
 [45] rtracklayer_1.48.0          extrafontdb_1.0             xfun_0.18                   testthat_2.3.2             
 [49] rvest_0.3.6                 lifecycle_0.2.0             XML_3.99-0.5                zlibbioc_1.34.0            
 [53] MASS_7.3-53                 scales_1.1.1                hms_0.5.3                   parallel_4.0.3             
 [57] SummarizedExperiment_1.18.2 proj4_1.0-10                RColorBrewer_1.1-2          yaml_2.2.1                 
 [61] memoise_1.1.0               ggrastr_0.2.1               stringi_1.5.3               RSQLite_2.2.1              
 [65] genefilter_1.70.0           S4Vectors_0.26.1            desc_1.2.0                  BiocGenerics_0.34.0        
 [69] BiocParallel_1.22.0         GenomeInfoDb_1.24.2         rlang_0.4.8                 pkgconfig_2.0.3            
 [73] matrixStats_0.57.0          bitops_1.0-6                evaluate_0.14               lattice_0.20-41            
 [77] GenomicAlignments_1.24.0    labeling_0.4.2              bit_4.0.4                   tidyselect_1.1.0           
 [81] magrittr_1.5                DESeq2_1.28.1               R6_2.5.0                    IRanges_2.22.2             
 [85] generics_0.0.2              DelayedArray_0.14.1         DBI_1.1.0                   pillar_1.4.6               
 [89] haven_2.3.1                 withr_2.3.0                 survival_3.2-7              RCurl_1.98-1.2             
 [93] ash_1.0-15                  modelr_0.1.8                crayon_1.3.4                KernSmooth_2.23-17         
 [97] rmarkdown_2.5               locfit_1.5-9.4              grid_4.0.3                  readxl_1.3.1               
[101] blob_1.2.1                  reprex_0.3.0                digest_0.6.27               xtable_1.8-4               
[105] stats4_4.0.3                munsell_0.5.0               beeswarm_0.2.3              vipor_0.4.5
enha EnhancedVolcano • 3.3k views
ADD COMMENT
2
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 16 days ago
Republic of Ireland

What is the output of str(my_list)?

Irrespective, EnhancedVolcano, via ggrepel, will only ever label as many genes (variables) as can be feasibly read by the viewer. It does not seem practical to me that 100 genes can be labeled in the same plot space.

I provide other functionality in EnhancedVolcano for highlighting genes of interest via alternate shape, colour, and size, if you can check the vignette, please.

Kevin

ADD COMMENT
1
Entering edit mode

Thanks so much Kevin. I did not necessarily want to label the whole 100, just the top 15/20 or so, but when I did the annotation it appeared to be random even when I made the my_list a list of those genes. Either way, I think it is more visually appealing with changing the color/shape so I ended up doing that. Thanks for your help.

Noah

ADD REPLY

Login before adding your answer.

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