Explanation of TDbasedUFEadv

#library(TDbasedUFEadv)

Introduction

Since TDbasedUFEadv is an advanced package from TDbasedUFE (Taguchi 2023), please master the contents in TDbasedUFE prior to the trial of this package.

Motivations

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.

Integrated analysis of two omics data sets

When features are shared.

Full tensor

Tensor decomposition towards tensor generated from two matrices
Tensor decomposition towards tensor generated from two matrices

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 ith feature of jth and kth objects, respectively (i.r., these two profiles share the features). In this case, we generate a tensor, xijk, by the product of two profiles as xijk = xijxik ∈ ℝN × M × K

and HOSVD was applied to xijk to get xijk = ∑12ell3G(ℓ123)u1iu2ju3k After that we can follow the standard procedure to select features is associated with the desired properties represented by the selected singular value vectors, u2j and u3k, attributed to objects, js and ks.

Matrix generated by partial summation

After partial summation of tensor
After partial summation of tensor

In the above, we dealt with full tensor. It is often difficult to treat full tensor, since it is as large as N × MtimesK. In this case, we can take the alternative approach. In order that we define reduced matrix with taking partial summation xjk = ∑ixijk and apply SVD to xjk as xjk = ∑λujvk 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.

When samples are shared.

Full tensor

Tensor decomposition towards tensor generated from two matrices
Tensor decomposition towards tensor generated from two matrices

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, xijk, by the product of two profiles as xijk = xijxkj ∈ ℝN × M × K

and HOSVD was applied to xijk to get xijk = ∑12ell3G(ℓ123)u1iu2ju3k After that we can follow the standard procedure to select features is and ks associated with the desired properties represented by the selected singular value vectors, u2j, attributed to objects, js.

Matrix generated from partial summation

After partial summation of tensor
After partial summation of tensor

In the above, we dealt with full tensor. It is often difficult to treat full tensor, since it is as large as N × MtimesK. In this case, we can take the alternative approach. In order that we define reduced matrix with taking partial summation xik = ∑jxijk and apply SVD to xjk as xik = ∑λuivk is and ks are selected with ui and vk, 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} $$

Integrated analysis using projection

Here we would like to propose an alternative strategy to integrate multiple tensors using projection with SVD.

When samples are shared.

Projection when samples are shared
Projection when samples are shared

Suppose we have multiomics data as xijk ∈ ℝNk × M × K for ith feature of jth sample at kth omics data.

In order to bundle them into a tensor, we applied SVD to them as xijk = ∑λ(k)uikvj(k)

Then apply HOSVD to vj(k) as vj(k) = ∑123G(ℓ123)u1u2ju3k After identifying the u2j and u3k of interest, we can compute uik as u2ik = ∑ju2jxikjk Then ik can be selected as usual.

When features are shared.

Projection when features are shared
Projection when features are shared

Suppose we have multiple sets of samples as xijkk ∈ ℝN × Mk × K

In order to bundle them into a tensor, we apply SVD to xijkk as xijkk = ∑λ(k)ui(k)ujk HOSVD is applied to ui(k) as ui(k) = ∑123G(ℓ123)u1u2iu3k u2jk is generated as u2jk = ∑iu2ixijkk

After identifying u2jks of interest, we select is using u2i.

sessionInfo()
#> R version 4.4.1 (2024-06-14)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04 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.26.so;  LAPACK version 3.12.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        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: Etc/UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#>  [1] STRINGdb_2.17.3              enrichR_3.2                 
#>  [3] RTCGA.clinical_20151101.35.0 RTCGA.rnaseq_20151101.35.0  
#>  [5] RTCGA_1.35.0                 enrichplot_1.25.2           
#>  [7] DOSE_3.99.1                  TDbasedUFEadv_1.5.0         
#>  [9] TDbasedUFE_1.5.0             BiocStyle_2.33.1            
#> 
#> loaded via a namespace (and not attached):
#>   [1] rTensor_1.4.8           splines_4.4.1           later_1.3.2            
#>   [4] ggplotify_0.1.2         bitops_1.0-8            tibble_3.2.1           
#>   [7] R.oo_1.26.0             polyclip_1.10-7         XML_3.99-0.17          
#>  [10] lifecycle_1.0.4         rstatix_0.7.2           lattice_0.22-6         
#>  [13] MASS_7.3-61             backports_1.5.0         magrittr_2.0.3         
#>  [16] sass_0.4.9              rmarkdown_2.28          jquerylib_0.1.4        
#>  [19] yaml_2.3.10             plotrix_3.8-4           httpuv_1.6.15          
#>  [22] cowplot_1.1.3           DBI_1.2.3               buildtools_1.0.0       
#>  [25] RColorBrewer_1.1-3      abind_1.4-5             MOFAdata_1.21.0        
#>  [28] zlibbioc_1.51.1         rvest_1.0.4             GenomicRanges_1.57.1   
#>  [31] purrr_1.0.2             R.utils_2.12.3          ggraph_2.2.1           
#>  [34] BiocGenerics_0.51.0     RCurl_1.98-1.16         hash_2.2.6.3           
#>  [37] yulab.utils_0.1.7       WriteXLS_6.7.0          tweenr_2.0.3           
#>  [40] GenomeInfoDbData_1.2.12 IRanges_2.39.2          KMsurv_0.1-5           
#>  [43] S4Vectors_0.43.2        ggrepel_0.9.5           tidytree_0.4.6         
#>  [46] maketools_1.3.0         proto_1.0.0             codetools_0.2-20       
#>  [49] xml2_1.3.6              ggforce_0.4.2           tximportData_1.33.0    
#>  [52] tidyselect_1.2.1        aplot_0.2.3             UCSC.utils_1.1.0       
#>  [55] farver_2.1.2            viridis_0.6.5           stats4_4.4.1           
#>  [58] jsonlite_1.8.8          tidygraph_1.3.1         survival_3.7-0         
#>  [61] tools_4.4.1             chron_2.3-61            treeio_1.29.1          
#>  [64] Rcpp_1.0.13             glue_1.7.0              gridExtra_2.3          
#>  [67] xfun_0.47               qvalue_2.37.0           ggthemes_5.1.0         
#>  [70] GenomeInfoDb_1.41.1     dplyr_1.1.4             withr_3.0.1            
#>  [73] BiocManager_1.30.25     fastmap_1.2.0           fansi_1.0.6            
#>  [76] caTools_1.18.2          digest_0.6.37           gridGraphics_0.5-1     
#>  [79] R6_2.5.1                mime_0.12               colorspace_2.1-1       
#>  [82] GO.db_3.19.1            gtools_3.9.5            RSQLite_2.3.7          
#>  [85] R.methodsS3_1.8.2       utf8_1.2.4              tidyr_1.3.1            
#>  [88] generics_0.1.3          data.table_1.16.0       graphlayouts_1.1.1     
#>  [91] httr_1.4.7              scatterpie_0.2.4        sqldf_0.4-11           
#>  [94] pkgconfig_2.0.3         gtable_0.3.5            blob_1.2.4             
#>  [97] XVector_0.45.0          sys_3.4.2               survMisc_0.5.6         
#> [100] shadowtext_0.1.4        htmltools_0.5.8.1       carData_3.0-5          
#> [103] fgsea_1.31.0            scales_1.3.0            Biobase_2.65.1         
#> [106] png_0.1-8               ggfun_0.1.6             knitr_1.48             
#> [109] km.ci_0.5-6             tzdb_0.4.0              reshape2_1.4.4         
#> [112] rjson_0.2.22            nlme_3.1-166            curl_5.2.2             
#> [115] cachem_1.1.0            zoo_1.8-12              stringr_1.5.1          
#> [118] KernSmooth_2.23-24      parallel_4.4.1          AnnotationDbi_1.67.0   
#> [121] pillar_1.9.0            grid_4.4.1              vctrs_0.6.5            
#> [124] gplots_3.1.3.1          promises_1.3.0          ggpubr_0.6.0           
#> [127] car_3.1-2               xtable_1.8-4            tximport_1.33.0        
#> [130] evaluate_0.24.0         readr_2.1.5             gsubfn_0.7             
#> [133] cli_3.6.3               compiler_4.4.1          rlang_1.1.4            
#> [136] crayon_1.5.3            ggsignif_0.6.4          labeling_0.4.3         
#> [139] survminer_0.4.9         plyr_1.8.9              fs_1.6.4               
#> [142] stringi_1.8.4           viridisLite_0.4.2       BiocParallel_1.39.0    
#> [145] assertthat_0.2.1        munsell_0.5.1           Biostrings_2.73.1      
#> [148] lazyeval_0.2.2          GOSemSim_2.31.2         Matrix_1.7-0           
#> [151] patchwork_1.2.0         hms_1.1.3               bit64_4.0.5            
#> [154] ggplot2_3.5.1           KEGGREST_1.45.1         shiny_1.9.1            
#> [157] highr_0.11              igraph_2.0.3            broom_1.0.6            
#> [160] memoise_2.0.1           bslib_0.8.0             ggtree_3.13.1          
#> [163] fastmatch_1.1-4         bit_4.0.5               ape_5.8
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.