Skip to contents
library(tRavis)
#> Thanks for using tRavis v0.73.20! If you encounter any bugs
#> or problems, please submit an issue at the Github page:
#> https://github.com/travis-m-blimkie/tRavis/issues

Extra examples

tr_clean_deseq_results

ex_deseq_results <- 
  readRDS(system.file("extdata", "ex_deseq_results.rds", package = "tRavis"))
ex_deseq_results
#> log2 fold change (MLE): condition B vs A 
#> Wald test p-value: condition B vs A 
#> DataFrame with 200 rows and 6 columns
#>          baseMean log2FoldChange     lfcSE      stat      pvalue        padj
#>         <numeric>      <numeric> <numeric> <numeric>   <numeric>   <numeric>
#> gene1      7.1530      -0.636105  0.750697 -0.847352 3.96799e-01 4.95998e-01
#> gene2    108.3659       2.872486  0.357737  8.029601 9.77899e-16 1.62983e-14
#> gene3     25.1923       1.724502  0.643106  2.681522 7.32882e-03 1.62863e-02
#> gene4    110.2302      -1.375727  0.321775 -4.275440 1.90761e-05 7.06521e-05
#> gene5     15.1829      -5.412610  0.819823 -6.602166 4.05195e-11 3.68359e-10
#> ...           ...            ...       ...       ...         ...         ...
#> gene196   1.28627      -0.654713  1.676396 -0.390548 6.96131e-01 7.86589e-01
#> gene197 591.21368       3.285941  0.278768 11.787369 4.53489e-32 4.53489e-30
#> gene198   4.67660       2.434828  0.961683  2.531839 1.13466e-02 2.33951e-02
#> gene199  14.96302      -2.313151  0.491582 -4.705521 2.53218e-06 1.17776e-05
#> gene200  17.69265       1.970386  0.602859  3.268401 1.08157e-03 3.00436e-03
tr_clean_deseq2_result(ex_deseq_results, p_adjusted = 0.1, fold_change = 2)
#> Found 110 DE genes for condition B vs A.
#> # A tibble: 110 × 7
#>    gene    baseMean log2FoldChange lfcSE   stat   pvalue     padj
#>    <chr>      <dbl>          <dbl> <dbl>  <dbl>    <dbl>    <dbl>
#>  1 gene95     853.            3.35 0.279  12.0  3.26e-33 6.53e-31
#>  2 gene197    591.            3.29 0.279  11.8  4.53e-32 4.53e-30
#>  3 gene180    420.            3.30 0.298  11.1  1.57e-28 1.05e-26
#>  4 gene70     235.           -2.91 0.276 -10.5  5.23e-26 2.62e-24
#>  5 gene106    886.            3.08 0.303  10.1  3.80e-24 1.52e-22
#>  6 gene187     57.3          -4.28 0.428 -10.0  1.42e-23 4.74e-22
#>  7 gene26      93.9           4.62 0.473   9.77 1.47e-22 4.20e-21
#>  8 gene68      72.7          -3.23 0.345  -9.37 7.58e-21 1.90e-19
#>  9 gene122    462.            2.63 0.307   8.58 9.79e-18 2.18e-16
#> 10 gene39     191.            2.67 0.325   8.20 2.33e-16 4.66e-15
#> # ℹ 100 more rows

tr_theme

library(ggplot2)

ggplot(mtcars, aes(as.factor(cyl), mpg)) + 
  geom_boxplot() + 
  tr_theme(base_family = "Helvetica", base_size = 20)

Session information

#> R version 4.3.2 (2023-10-31)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.3 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
#>  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
#>  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
#> [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
#> 
#> time zone: UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats4    stats     graphics  grDevices utils     datasets  methods  
#> [8] base     
#> 
#> other attached packages:
#>  [1] ggplot2_3.4.4               DESeq2_1.40.2              
#>  [3] SummarizedExperiment_1.30.2 Biobase_2.60.0             
#>  [5] MatrixGenerics_1.12.3       matrixStats_1.1.0          
#>  [7] GenomicRanges_1.52.1        GenomeInfoDb_1.36.4        
#>  [9] IRanges_2.34.1              S4Vectors_0.38.2           
#> [11] BiocGenerics_0.46.0         tRavis_0.73.20             
#> 
#> loaded via a namespace (and not attached):
#>  [1] tidyselect_1.2.0        viridisLite_0.4.2       dplyr_1.1.4            
#>  [4] farver_2.1.1            bitops_1.0-7            fastmap_1.1.1          
#>  [7] lazyeval_0.2.2          RCurl_1.98-1.13         janitor_2.2.0          
#> [10] digest_0.6.33           timechange_0.2.0        lifecycle_1.0.4        
#> [13] magrittr_2.0.3          compiler_4.3.2          rlang_1.1.2            
#> [16] sass_0.4.7              tools_4.3.2             utf8_1.2.4             
#> [19] yaml_2.3.7              data.table_1.14.8       knitr_1.45             
#> [22] S4Arrays_1.0.6          labeling_0.4.3          htmlwidgets_1.6.2      
#> [25] DelayedArray_0.26.7     abind_1.4-5             BiocParallel_1.34.2    
#> [28] withr_2.5.2             purrr_1.0.2             desc_1.4.2             
#> [31] grid_4.3.2              fansi_1.0.5             colorspace_2.1-0       
#> [34] scales_1.2.1            cli_3.6.1               rmarkdown_2.25         
#> [37] crayon_1.5.2            ragg_1.2.6              generics_0.1.3         
#> [40] httr_1.4.7              tzdb_0.4.0              rjson_0.2.21           
#> [43] cachem_1.0.8            stringr_1.5.1           zlibbioc_1.46.0        
#> [46] parallel_4.3.2          XVector_0.40.0          vctrs_0.6.4            
#> [49] Matrix_1.6-1.1          jsonlite_1.8.7          hms_1.1.3              
#> [52] systemfonts_1.0.5       locfit_1.5-9.8          plotly_4.10.3          
#> [55] tidyr_1.3.0             jquerylib_0.1.4         glue_1.6.2             
#> [58] pkgdown_2.0.7           codetools_0.2-19        lubridate_1.9.3        
#> [61] stringi_1.8.1           gtable_0.3.4            munsell_0.5.0          
#> [64] tibble_3.2.1            pillar_1.9.0            htmltools_0.5.7        
#> [67] GenomeInfoDbData_1.2.10 R6_2.5.1                textshaping_0.3.7      
#> [70] rprojroot_2.0.4         evaluate_0.23           lattice_0.21-9         
#> [73] readr_2.1.4             highr_0.10              memoise_2.0.1          
#> [76] snakecase_0.11.1        bslib_0.5.1             Rcpp_1.0.11            
#> [79] xfun_0.41               fs_1.6.3                pkgconfig_2.0.3