Y-h. Taguchi1*
1Department of Physics, Chuo University, Tokyo 112-8551, Japan
#library(TDbasedUFEadv)
Since TDbasedUFEadv is an advanced package from TDbasedUFE (Taguchi 2023), please master the contents in TDbasedUFE prior to the trial of this package.
Since the publication of the book (Taguchi 2020) describing the methodology, I have published numerous papers using this method. In spite of that, very limited number of researcher used this method, possibly because of unfamiliarity with the mathematical concepts used in this methodology, tensors. Thus I decided to develop the packages by which users can use the methods without detailed knowledge about the tensor.
The main purpose of this package is to select features (typically genes) based upon provided omics data sets. In this sense, apparently the functionality of this package is similar to DESeq2 or limma, which have functionality that can identify differentially expressed genes. In contrast to those supervised methods, the present method is unsupervised one, which provides users what kind of profiles are observed over samples, and users are advised to select one of favorite features by which features are selected. In addition to this, the present method is suitable to small number of samples associated with large number of features. Since this situation is very common in genomics, the present method is supposed to be suitable to be applied to genomics, although it does not look liked the methods very specific to genomics science. Actually, we have published the number of papers using the methods implemented in the present package. I hope that one can make use of this package for his/her own researches.
Suppose we have two omics profiles \[ x_{ij} \in \mathbb{R}^{N \times M} \\ x_{ik} \in \mathbb{R}^{N \times K} \] that represent values of \(i\)th feature of \(j\)th and \(k\)th objects, respectively (i.r., these two profiles share the features). In this case, we generate a tensor, \(x_{ijk}\), by the product of two profiles as \[ x_{ijk} = x_{ij}x_{ik} \in \mathbb{R}^{N \times M \times K} \]
and HOSVD was applied to \(x_{ijk}\) to get \[ x_{ijk} = \sum_{\ell_1} \sum_{\ell_2} \sum_{ell_3} G(\ell_1 \ell_2 \ell_3) u_{\ell_1 i} u_{\ell_2 j} u_{\ell_3 k} \] After that we can follow the standard procedure to select features \(i\)s associated with the desired properties represented by the selected singular value vectors, \(u_{\ell_2 j}\) and \(u_{\ell_3 k}\), attributed to objects, \(j\)s and \(k\)s.
In the above, we dealt with full tensor. It is often difficult to treat full tensor, since it is as large as \(N \times M times K\). In this case, we can take the alternative approach. In order that we define reduced matrix with taking partial summation \[ x_{jk} = \sum_i x_{ijk} \] and apply SVD to \(x_{jk}\) as \[ x_{jk} = \sum_\ell \lambda_\ell u_{\ell j} v_{\ell k} \] and singular value vectors attributed to samples as \[ u^{(j)}_{\ell i} = \sum_j u_{\ell j} x_{ij} \\ u^{(k)}_{\ell i} = \sum_k v_{\ell k} x_{ik} \] In this case, singular value vectors are attributed separately to features associated with objects \(j\) and \(k\), respectively.
The feature selection can be done using these singular value vectors associated with selected singular value vectors attributed to samples, \(j\) and \(k\).
In the case where not features but samples are shared between two omics data, we can do something similar. \[ x_{ij} \in \mathbb{R}^{N \times M} \\ x_{kj} \in \mathbb{R}^{K \times M} \]
In this case, we generate a tensor, \(x_{ijk}\), by the product of two profiles as \[ x_{ijk} = x_{ij}x_{kj} \in \mathbb{R}^{N \times M \times K} \]
and HOSVD was applied to \(x_{ijk}\) to get \[ x_{ijk} = \sum_{\ell_1} \sum_{\ell_2} \sum_{ell_3} G(\ell_1 \ell_2 \ell_3) u_{\ell_1 i} u_{\ell_2 j} u_{\ell_3 k} \] After that we can follow the standard procedure to select features \(i\)s and \(k\)s associated with the desired properties represented by the selected singular value vectors, \(u_{\ell_2 j}\), attributed to objects, \(j\)s.
In the above, we dealt with full tensor. It is often difficult to treat full tensor, since it is as large as \(N \times M times K\). In this case, we can take the alternative approach. In order that we define reduced matrix with taking partial summation \[ x_{ik} = \sum_j x_{ijk} \] and apply SVD to \(x_{jk}\) as \[ x_{ik} = \sum_\ell \lambda_\ell u_{\ell i} v_{\ell k} \] \(i\)s and \(k\)s are selected with \(u_{\ell i}\) and \(v_{\ell k}\), respectively. Singular value vectors attributed to samples can be computed as \[ u^{(i)}_{\ell j} = \sum_i u_{\ell i} x_{ij} \\ u^{(k)}_{\ell j} = \sum_k v_{\ell k} x_{kj} \]
Here we would like to propose an alternative strategy to integrate multiple tensors using projection with SVD.
Suppose we have multiomics data as \[ x_{ijk} \in \mathbb{R}^{N_k \times M \times K} \] for \(i\)th feature of \(j\)th sample at \(k\)th omics data.
In order to bundle them into a tensor, we applied SVD to them as \[ x_{ijk} = \sum_{\ell} \lambda^{(k)}_\ell u_{\ell i_k} v^{(k)}_{\ell j} \]
Then apply HOSVD to \(v^{(k)}_{\ell j}\) as \[ v^{(k)}_{\ell j} = \sum_{\ell_1} \sum_{\ell_2} \sum_{\ell_3} G(\ell_1 \ell_2 \ell_3) u_{\ell_1 \ell } u_{\ell_2 j} u_{\ell_3 k} \] After identifying the \(u_{\ell_2j}\) and \(u_{\ell_3 k}\) of interest, we can compute \(u_{\ell i_k}\) as \[ u_{\ell_2 i_k} = \sum_j u_{\ell_2 j} x_{i_k j k} \] Then \(i_k\) can be selected as usual.
Suppose we have multiple sets of samples as \[ x_{ij_k k} \in \mathbb{R}^{N \times M_k \times K} \]
In order to bundle them into a tensor, we apply SVD to \(x_{i j_k k}\) as \[ x_{i j_k k} = \sum_\ell \lambda^{(k)}_\ell u^{(k)}_{\ell i} u_{\ell j_k} \] HOSVD is applied to \(u^{(k)}_{\ell i}\) as \[ u^{(k)}_{\ell i} = \sum_{\ell_1} \sum_{\ell_2} \sum_{\ell_3} G(\ell_1 \ell_2 \ell_3) u_{\ell_1 \ell} u_{\ell_2 i} u_{\ell_3 k} \] \(u_{\ell_2 j_k}\) is generated as \[ u_{\ell_2 j_k} = \sum_i u_{\ell_2 i}x_{i j_k k} \]
After identifying \(u_{\ell_2 j_k}\)s of interest, we select \(i\)s using \(u_{\ell_2 i}\).
sessionInfo()
#> R version 4.3.1 (2023-06-16)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.18-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] S4Vectors_0.40.0 IRanges_2.36.0
#> [3] STRINGdb_2.14.0 enrichR_3.2
#> [5] RTCGA.clinical_20151101.31.0 RTCGA.rnaseq_20151101.31.0
#> [7] RTCGA_1.32.0 enrichplot_1.22.0
#> [9] DOSE_3.28.0 TDbasedUFEadv_1.2.0
#> [11] TDbasedUFE_1.2.0 BiocStyle_2.30.0
#>
#> loaded via a namespace (and not attached):
#> [1] rTensor_1.4.8 splines_4.3.1
#> [3] later_1.3.1 ggplotify_0.1.2
#> [5] bitops_1.0-7 filelock_1.0.2
#> [7] tibble_3.2.1 polyclip_1.10-6
#> [9] XML_3.99-0.14 lifecycle_1.0.3
#> [11] rstatix_0.7.2 lattice_0.22-5
#> [13] MASS_7.3-60 backports_1.4.1
#> [15] magrittr_2.0.3 sass_0.4.7
#> [17] rmarkdown_2.25 jquerylib_0.1.4
#> [19] yaml_2.3.7 plotrix_3.8-2
#> [21] httpuv_1.6.12 cowplot_1.1.1
#> [23] DBI_1.1.3 RColorBrewer_1.1-3
#> [25] abind_1.4-5 MOFAdata_1.17.1
#> [27] zlibbioc_1.48.0 rvest_1.0.3
#> [29] GenomicRanges_1.54.0 purrr_1.0.2
#> [31] ggraph_2.1.0 BiocGenerics_0.48.0
#> [33] RCurl_1.98-1.12 yulab.utils_0.1.0
#> [35] hash_2.2.6.3 WriteXLS_6.4.0
#> [37] tweenr_2.0.2 rappdirs_0.3.3
#> [39] GenomeInfoDbData_1.2.11 KMsurv_0.1-5
#> [41] ggrepel_0.9.4 tidytree_0.4.5
#> [43] proto_1.0.0 codetools_0.2-19
#> [45] xml2_1.3.5 ggforce_0.4.1
#> [47] tximportData_1.29.0 tidyselect_1.2.0
#> [49] aplot_0.2.2 farver_2.1.1
#> [51] viridis_0.6.4 stats4_4.3.1
#> [53] BiocFileCache_2.10.0 jsonlite_1.8.7
#> [55] ellipsis_0.3.2 tidygraph_1.2.3
#> [57] survival_3.5-7 tools_4.3.1
#> [59] chron_2.3-61 treeio_1.26.0
#> [61] HPO.db_0.99.2 Rcpp_1.0.11
#> [63] glue_1.6.2 gridExtra_2.3
#> [65] xfun_0.40 qvalue_2.34.0
#> [67] ggthemes_4.2.4 GenomeInfoDb_1.38.0
#> [69] dplyr_1.1.3 withr_2.5.1
#> [71] BiocManager_1.30.22 fastmap_1.1.1
#> [73] fansi_1.0.5 caTools_1.18.2
#> [75] digest_0.6.33 gridGraphics_0.5-1
#> [77] R6_2.5.1 mime_0.12
#> [79] colorspace_2.1-0 GO.db_3.18.0
#> [81] gtools_3.9.4 RSQLite_2.3.1
#> [83] utf8_1.2.4 tidyr_1.3.0
#> [85] generics_0.1.3 data.table_1.14.8
#> [87] graphlayouts_1.0.1 httr_1.4.7
#> [89] scatterpie_0.2.1 sqldf_0.4-11
#> [91] pkgconfig_2.0.3 gtable_0.3.4
#> [93] blob_1.2.4 XVector_0.42.0
#> [95] survMisc_0.5.6 shadowtext_0.1.2
#> [97] htmltools_0.5.6.1 carData_3.0-5
#> [99] bookdown_0.36 fgsea_1.28.0
#> [101] scales_1.2.1 Biobase_2.62.0
#> [103] png_0.1-8 ggfun_0.1.3
#> [105] knitr_1.44 km.ci_0.5-6
#> [107] tzdb_0.4.0 reshape2_1.4.4
#> [109] rjson_0.2.21 nlme_3.1-163
#> [111] curl_5.1.0 cachem_1.0.8
#> [113] zoo_1.8-12 stringr_1.5.0
#> [115] BiocVersion_3.18.0 KernSmooth_2.23-22
#> [117] parallel_4.3.1 HDO.db_0.99.1
#> [119] AnnotationDbi_1.64.0 pillar_1.9.0
#> [121] grid_4.3.1 vctrs_0.6.4
#> [123] gplots_3.1.3 promises_1.2.1
#> [125] ggpubr_0.6.0 car_3.1-2
#> [127] dbplyr_2.3.4 xtable_1.8-4
#> [129] tximport_1.30.0 evaluate_0.22
#> [131] readr_2.1.4 gsubfn_0.7
#> [133] cli_3.6.1 compiler_4.3.1
#> [135] rlang_1.1.1 crayon_1.5.2
#> [137] ggsignif_0.6.4 labeling_0.4.3
#> [139] survminer_0.4.9 fs_1.6.3
#> [141] plyr_1.8.9 stringi_1.7.12
#> [143] viridisLite_0.4.2 BiocParallel_1.36.0
#> [145] assertthat_0.2.1 MPO.db_0.99.7
#> [147] munsell_0.5.0 Biostrings_2.70.0
#> [149] lazyeval_0.2.2 GOSemSim_2.28.0
#> [151] Matrix_1.6-1.1 patchwork_1.1.3
#> [153] hms_1.1.3 bit64_4.0.5
#> [155] ggplot2_3.4.4 KEGGREST_1.42.0
#> [157] shiny_1.7.5.1 interactiveDisplayBase_1.40.0
#> [159] AnnotationHub_3.10.0 igraph_1.5.1
#> [161] broom_1.0.5 memoise_2.0.1
#> [163] bslib_0.5.1 ggtree_3.10.0
#> [165] fastmatch_1.1-4 bit_4.0.5
#> [167] ape_5.7-1
Taguchi, Y-H. 2020. Unsupervised Feature Extraction Applied to Bioinformatics. Springer International Publishing. https://doi.org/10.1007/978-3-030-22456-1.
———. 2023. TDbasedUFE: Tensor Decomposition Bassed Unsupervised Feature Extraction. https://github.com/tagtag/TDbasedUFE.