Skip to contents

Get the features corresponding to each of the top k largest trajectories of training-regulated features for the given tissue(s) and ome(s). Optionally include features in the non-null 8-week nodes as well (e.g., 8w_F1_M1, 8w_F0_M-1).

Usage

extract_top_trajectories(
  tissues,
  omes = MotrpacRatTraining6moData::ASSAY_ABBREV,
  k = 5,
  min_size = 5,
  add_week8 = FALSE,
  node_sets = MotrpacRatTraining6moData::GRAPH_COMPONENTS$node_sets,
  edge_sets = MotrpacRatTraining6moData::GRAPH_COMPONENTS$edge_sets
)

Arguments

tissues

character, tissue abbreviation, at least one of MotrpacRatTraining6moData::TISSUE_ABBREV

omes

character, assay abbreviation, one of MotrpacRatTraining6moData::ASSAY_ABBREV. All assays by default.

k

integer, return the top k largest trajectories/paths with at least min_size features. Default: 5

min_size

integer, minimal cluster size to be considered. Clusters with fewer than this number of features are excluded. Default: 5

add_week8

logical, whether to include non-null 8-week nodes with at least min_size features in addition to the top k largest trajectories/paths. Default: FALSE

node_sets

named list with the node (state) sets of analytes/features. GRAPH_COMPONENTS$node_sets by default.

edge_sets

named list with the edge (state) sets of analytes/features. GRAPH_COMPONENTS$edge_sets by default.

Value

named list where names are the names of the graphical clusters (paths/trajectories and, optionally, non-null 8-week nodes) and values are vectors of the training-regulated features that belong to that cluster, in the format ASSAY_ABBREV;TISSUE_ABBREV;[feature_ID].

Examples

# Top 3 trajectories of training-regulated proteins in the liver
res = extract_top_trajectories("LIVER", omes="PROT", k=3)
names(res)
#> [1] "1w_F0_M0->2w_F0_M0->4w_F0_M0->8w_F-1_M-1"
#> [2] "1w_F0_M0->2w_F0_M0->4w_F0_M0->8w_F1_M1"  
#> [3] "1w_F0_M1->2w_F0_M1->4w_F0_M1->8w_F1_M1"  
lapply(res, length)
#> $`1w_F0_M0->2w_F0_M0->4w_F0_M0->8w_F-1_M-1`
#> [1] 68
#> 
#> $`1w_F0_M0->2w_F0_M0->4w_F0_M0->8w_F1_M1`
#> [1] 52
#> 
#> $`1w_F0_M1->2w_F0_M1->4w_F0_M1->8w_F1_M1`
#> [1] 41
#> 

# Top 5 trajectories and 8-week nodes for the union of training-regulated 
# features in the heart and gastrocnemius (all omes)
res = extract_top_trajectories(c("HEART","SKM-GN"), add_week8=TRUE)
names(res)
#>  [1] "8w_F1_M1"                                      
#>  [2] "8w_F-1_M-1"                                    
#>  [3] "8w_F-1_M0"                                     
#>  [4] "8w_F-1_M1"                                     
#>  [5] "8w_F0_M-1"                                     
#>  [6] "8w_F0_M1"                                      
#>  [7] "8w_F1_M-1"                                     
#>  [8] "8w_F1_M0"                                      
#>  [9] "1w_F1_M1->2w_F1_M1->4w_F1_M1->8w_F1_M1"        
#> [10] "1w_F-1_M-1->2w_F-1_M-1->4w_F-1_M-1->8w_F-1_M-1"
#> [11] "1w_F0_M1->2w_F0_M1->4w_F1_M1->8w_F1_M1"        
#> [12] "1w_F0_M1->2w_F0_M1->4w_F0_M1->8w_F1_M1"        
#> [13] "1w_F0_M-1->2w_F0_M-1->4w_F-1_M-1->8w_F-1_M-1"  
lapply(res, length)
#> $`8w_F1_M1`
#> [1] 1828
#> 
#> $`8w_F-1_M-1`
#> [1] 1267
#> 
#> $`8w_F-1_M0`
#> [1] 341
#> 
#> $`8w_F-1_M1`
#> [1] 28
#> 
#> $`8w_F0_M-1`
#> [1] 362
#> 
#> $`8w_F0_M1`
#> [1] 404
#> 
#> $`8w_F1_M-1`
#> [1] 18
#> 
#> $`8w_F1_M0`
#> [1] 267
#> 
#> $`1w_F1_M1->2w_F1_M1->4w_F1_M1->8w_F1_M1`
#> [1] 606
#> 
#> $`1w_F-1_M-1->2w_F-1_M-1->4w_F-1_M-1->8w_F-1_M-1`
#> [1] 406
#> 
#> $`1w_F0_M1->2w_F0_M1->4w_F1_M1->8w_F1_M1`
#> [1] 245
#> 
#> $`1w_F0_M1->2w_F0_M1->4w_F0_M1->8w_F1_M1`
#> [1] 132
#> 
#> $`1w_F0_M-1->2w_F0_M-1->4w_F-1_M-1->8w_F-1_M-1`
#> [1] 129
#>