Set up

Load Packages

suppressPackageStartupMessages({
  library(GenomicSuperSignature)
  library(curatedTCGAData)
  library(MultiAssayExperiment)
  library(TCGAutils)
  library(tidyr)
  library(dplyr)
  library(ggplot2)
  library(magick)
  library(wordcloud)
  library(EnrichmentBrowser)
  library(ztable)
  library(magrittr)
})

Load TCGA dataset

load("~/Documents/GitHub/GSS/data/TCGA_validationDatasets.rda")
datasets <- TCGA_validationDatasets[1:7]

Load RAVmodel

RAVmodel <- getModel("C2", load=TRUE)

Select HNSC RNA metadata

hnsc <- curatedTCGAData(diseaseCode = "HNSC", 
                        assays = "RNA*", 
                        version = "2.0.1", 
                        dry.run = FALSE)

hnsc_rna <- getWithColData(hnsc, 
                           "HNSC_RNASeq2Gene-20160128", 
                           mode = "append")

hnsc_meta <- colData(hnsc_rna)

heatmapTable: HNSC

val_hnsc <- validate(datasets$HNSC, RAVmodel)
heatmapTable(val_hnsc, RAVmodel)

Subset

Filter attributes

sparsity_summary <- table(colSums(is.na(hnsc_meta)))
sparsity_summary
## 
##   0   1   2   3   4   5   7   8  10  11  12  13  14  16  23  26  41  50  54  63 
## 235   7   5  23   6  20   2   1   1   1   1   2   1   4   2   3   2   1   1   1 
##  72  73  76  83  86  91 100 115 133 144 147 148 150 151 164 173 175 177 186 191 
##   3   1   1   1   3   5   1   1   2   1   1   1   1   1   1   1   9   1   1   1 
## 192 206 212 216 223 234 241 245 246 250 252 253 256 259 261 263 266 267 269 273 
##   1   1   3   3   3   1   1   1   5   3   1   1   1   2   1   1   1   1   1   1 
## 289 303 308 310 311 312 313 324 325 326 329 330 333 335 341 359 362 363 367 368 
##   2   1   1   2  15  15   1  10   1   2   2   1   1   1   1   1   1   1   3   1 
## 369 371 373 379 380 381 382 384 386 387 389 390 391 397 402 407 410 412 414 416 
##   2   1   1   1   6   2   1   1   1   1   1   1   2   1   1   5   1   1   1   1 
## 420 421 425 426 427 431 433 435 437 440 446 451 452 454 456 457 460 461 462 463 
##   2   4   1   1   3   1   2   1   3   1   1   1   1  60   2   3   1   1   5  24 
## 466 467 469 472 473 474 475 476 477 479 480 481 482 483 485 488 489 490 491 493 
##   1   3   1   1   1   3   2   1   1  17   1   1   2   1   8  41   1   4   2   1 
## 495 502 505 507 508 509 510 512 515 516 517 518 519 520 521 522 523 524 525 526 
##   1   1   1   1   1  17   2   2  23   1   2   4   2   2   2  19   8   2   3   8 
## 527 528 529 530 531 532 533 534 537 538 539 541 542 543 544 545 546 548 549 550 
##   2   1   2  10   1   5   3   3   1   1   3   3   8   3   4   5   2  14   6   4 
## 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 
##  10   8  10   9   7  14  46  10  19  20  44  79  45 100 140   6

Sparsity Plot

# Only select for columns with more than 10% completeness
keep_attr_ind <- which(colSums(!is.na(hnsc_meta)) > round(nrow(hnsc_meta)/10))
meta_sub1 <- hnsc_meta[keep_attr_ind]
meta_sub1 <- subset(meta_sub1, select = -patientID)
# Randomly select for 100 rows
set.seed(1)
random_sample_ind <- sample(1:nrow(meta_sub1), 100)
meta_sub2 <- meta_sub1[random_sample_ind,]
# Check for data types in listData
unique(sapply(hnsc_meta@listData, type))
## [1] "character" "integer"   "double"
charcTb <- meta_sub2[, sapply(meta_sub2, class) == 'character']
numTb <- meta_sub2[, sapply(meta_sub2, class) %in% c('numeric', 'integer')]
# Calculate validation scores
sampleScore <- calculateScore(hnsc_rna, RAVmodel)
# Select for RAVs with a minimum silhouette width of 0.4
val_all <- validate(hnsc_rna, RAVmodel)
validated_ind <- validatedSignatures(val_all, num.out = 30, RAVmodel,
                                     swCutoff = 0.4, indexOnly = TRUE)
validated_ind
##  [1] 4483   95 4489 2670 1301 1959 1302  988  987 3033 1002 1125 4689 2673 1960
## [16]  996 4486  998  999 1001 4113
# Subset sampleScore to join with MCPcounter
sampleScore_sub <- sampleScore[random_sample_ind, validated_ind] %>% as.data.frame() 

Calculate r-squared value

Numeric variables

# R squared value function
calculateRsq <- function (x, y) stats::cor(x, y, use = "na.or.complete") ^ 2
# Calculate r-squared for numeric attributes
rsq_numAttr_tb <- as.data.frame(matrix(nrow = ncol(numTb), 
                                       ncol = ncol(sampleScore_sub)))

colnames(rsq_numAttr_tb) <- colnames(sampleScore_sub)
rownames(rsq_numAttr_tb) <- colnames(numTb)

for (i in seq_len(ncol(numTb))) {
    for (j in seq_len(ncol(sampleScore_sub))) {
        rsq <- calculateRsq(numTb[,i], sampleScore_sub[,j])
        rsq_numAttr_tb[i, j] <- rsq
    }
}
dim(rsq_numAttr_tb) # 330 features x 21 RAVs
## [1] 330  21
# rsq_numAttr_tb[1:10, 1:20]
max_rav <- apply(rsq_numAttr_tb, 1, max)
max_attr <- which(max_rav > 0.4 & max_rav < 1) # Decreased the lower limit to 0.4
max_rav[max_attr]
##                                                                   patient.drugs.drug.2.day_of_form_completion 
##                                                                                                     0.6934929 
##                                                                 patient.drugs.drug.2.month_of_form_completion 
##                                                                                                     0.7550794 
##                                                                  patient.drugs.drug.2.year_of_form_completion 
##                                                                                                     0.4328534 
##                                                        patient.follow_ups.follow_up.2.year_of_form_completion 
##                                                                                                     0.4159321 
## patient.follow_ups.follow_up.new_tumor_events.new_tumor_event.days_to_new_tumor_event_after_initial_treatment 
##                                                                                                     0.5460700 
##                                                         patient.radiations.radiation.2.day_of_form_completion 
##                                                                                                     0.4097006 
##                                      patient.samples.sample.portions.portion.analytes.analyte.a260_a280_ratio 
##                                                                                                     0.4227139 
##                          patient.samples.sample.portions.portion.slides.slide.2.percent_monocyte_infiltration 
##                                                                                                     0.5637815

Features with an r squared value > 0.4

target_rsq <- rsq_numAttr_tb[max_attr,]

heatmapTable

options(ztable.type="html")
z = ztable(target_rsq)
z %>% makeHeatmap()
  RAV4483 RAV95 RAV4489 RAV2670 RAV1301 RAV1959 RAV1302 RAV988 RAV987 RAV3033 RAV1002 RAV1125 RAV4689 RAV2673 RAV1960 RAV996 RAV4486 RAV998 RAV999 RAV1001 RAV4113
patient.drugs.drug.2.day_of_form_completion 0.11 0.00 0.00 0.01 0.01 0.08 0.10 0.04 0.02 0.01 0.00 0.02 0.07 0.00 0.69 0.15 0.03 0.01 0.01 0.13 0.01
patient.drugs.drug.2.month_of_form_completion 0.05 0.15 0.06 0.24 0.27 0.21 0.32 0.19 0.39 0.18 0.06 0.06 0.18 0.09 0.12 0.03 0.00 0.76 0.03 0.42 0.37
patient.drugs.drug.2.year_of_form_completion 0.31 0.12 0.20 0.02 0.02 0.12 0.01 0.03 0.00 0.09 0.06 0.21 0.25 0.06 0.39 0.01 0.43 0.04 0.01 0.17 0.03
patient.follow_ups.follow_up.2.year_of_form_completion 0.20 0.30 0.05 0.19 0.21 0.06 0.12 0.21 0.09 0.42 0.09 0.06 0.08 0.13 0.01 0.08 0.05 0.09 0.00 0.06 0.05
patient.follow_ups.follow_up.new_tumor_events.new_tumor_event.days_to_new_tumor_event_after_initial_treatment 0.13 0.06 0.15 0.16 0.13 0.00 0.11 0.39 0.05 0.31 0.09 0.14 0.48 0.02 0.00 0.03 0.55 0.02 0.07 0.30 0.02
patient.radiations.radiation.2.day_of_form_completion 0.21 0.17 0.21 0.00 0.00 0.08 0.01 0.04 0.00 0.10 0.07 0.41 0.41 0.30 0.29 0.00 0.11 0.02 0.03 0.12 0.03
patient.samples.sample.portions.portion.analytes.analyte.a260_a280_ratio 0.40 0.42 0.04 0.17 0.18 0.02 0.04 0.13 0.09 0.32 0.37 0.04 0.16 0.26 0.03 0.02 0.01 0.15 0.19 0.00 0.03
patient.samples.sample.portions.portion.slides.slide.2.percent_monocyte_infiltration 0.25 0.11 0.27 0.06 0.07 0.06 0.00 0.26 0.02 0.07 0.12 0.56 0.13 0.22 0.23 0.43 0.25 0.52 0.07 0.12 0.05

Calculate F-Statistic (ANOVA)

Character variables

# Convert to factor data type
factorTb <- meta_sub2[, sapply(meta_sub2, class) == 'character']
factorTb[sapply(factorTb, is.character)] <- lapply(factorTb[sapply(factorTb, is.character)], as.factor)

new_ind <- c()

# Select for factors with at least two possible values
for (i in 1:length(factorTb)) {
  if (nlevels(factorTb[, i]) > 1) {
    new_ind <- c(new_ind, i)
  }
}

new_factorTb <- factorTb[,new_ind]
# Calculate p-value for factor attributes
aov_factorAttr_tb <- as.data.frame(matrix(nrow = ncol(new_factorTb),
                                          ncol = ncol(sampleScore_sub)))

rownames(aov_factorAttr_tb) <- colnames(new_factorTb)
colnames(aov_factorAttr_tb) <- colnames(sampleScore_sub)

for (i in seq_len(ncol(sampleScore_sub))) {
  for (j in seq_len(ncol(new_factorTb))) {
    if (!is.null(summary(aov(sampleScore_sub[, i] ~ new_factorTb[, j]))[[1]]$`Pr(>F)`[1])) {
      aov_factorAttr_tb[j, i] <- summary(aov(sampleScore_sub[, i] ~ new_factorTb[, j]))[[1]]$`Pr(>F)`[1]
    } else {
      aov_factorAttr_tb[j, i] <- NA
    }
  }
}
# Calculate f-statistics for factor attributes
aov_factorAttr_fstat <- as.data.frame(matrix(nrow = ncol(new_factorTb),
                                          ncol = ncol(sampleScore_sub)))

rownames(aov_factorAttr_fstat) <- colnames(new_factorTb)
colnames(aov_factorAttr_fstat) <- colnames(sampleScore_sub)

for (i in seq_len(ncol(sampleScore_sub))) {
  for (j in seq_len(ncol(new_factorTb))) {
    if (!is.null(summary(aov(sampleScore_sub[, i] ~ new_factorTb[, j]))[[1]]$`F value`[1])) {
      aov_factorAttr_fstat[j, i] <- summary(aov(sampleScore_sub[, i] ~ new_factorTb[, j]))[[1]]$`F value`[1]
    } else {
      aov_factorAttr_fstat[j, i] <- NA
    }
  }
}
# Select for p-values < 0.05
min_rav <- apply(aov_factorAttr_tb, 1, min)
min_attr <- which(min_rav < 0.05)
head(min_rav[min_attr])
##  pathologic_stage pathology_N_stage pathology_M_stage            gender 
##       0.010795322       0.001278662       0.001588612       0.001554764 
## radiation_therapy histological_type 
##       0.004244113       0.004208684

Features with a p-value < 0.05

target_aov <- aov_factorAttr_tb[min_attr,]

heatmapTable

options(ztable.type="html")
ztable(target_aov) %>%
  makeHeatmap(palette = 'Blues') %>%
  print(caption="ANOVA p-values")
ANOVA p-values
  RAV4483 RAV95 RAV4489 RAV2670 RAV1301 RAV1959 RAV1302 RAV988 RAV987 RAV3033 RAV1002 RAV1125 RAV4689 RAV2673 RAV1960 RAV996 RAV4486 RAV998 RAV999 RAV1001 RAV4113
pathologic_stage 0.08 0.06 0.06 0.19 0.19 0.05 0.11 0.23 0.05 0.23 0.61 0.01 0.65 0.19 0.13 0.24 0.02 0.45 0.15 0.10 0.44
pathology_N_stage 0.00 0.00 0.03 0.12 0.10 0.02 0.13 0.21 0.07 0.04 0.03 0.01 0.23 0.01 0.22 0.15 0.08 0.09 0.07 0.24 0.87
pathology_M_stage 0.38 0.31 0.09 0.01 0.01 0.21 0.03 0.00 0.05 0.02 0.49 0.11 0.02 0.15 0.41 0.06 0.03 0.06 0.29 0.43 0.08
gender 0.21 0.91 0.01 0.14 0.14 0.00 0.02 0.21 0.02 0.58 0.14 0.01 0.34 0.13 0.04 0.04 0.28 0.26 0.25 0.00 0.83
radiation_therapy 0.02 0.93 0.02 0.39 0.54 0.04 0.38 0.06 0.11 0.82 0.58 0.00 0.73 0.05 0.13 0.08 0.05 0.05 1.00 0.13 0.18
histological_type 0.01 0.08 0.02 0.35 0.29 0.44 0.68 0.04 0.63 0.11 0.20 0.00 0.25 0.03 0.15 0.14 0.02 0.02 0.72 0.78 0.06
patient.alcohol_history_documented 0.07 0.33 0.03 0.53 0.52 0.03 0.22 0.09 0.11 0.68 0.06 0.01 0.79 0.09 0.11 0.13 0.50 0.81 0.12 0.01 0.13
patient.anatomic_neoplasm_subdivision 0.11 0.54 0.01 0.24 0.28 0.02 0.13 0.03 0.23 0.42 0.48 0.00 0.59 0.10 0.34 0.07 0.18 0.64 0.47 0.00 0.54
patient.clinical_cqcf.consent_or_death_status 0.05 0.31 0.03 0.62 0.58 0.46 0.60 0.01 0.56 0.51 0.55 0.02 0.96 0.09 0.55 0.08 0.19 0.08 0.66 0.66 0.89
patient.clinical_cqcf.frozen_specimen_anatomic_site 0.11 0.54 0.01 0.24 0.28 0.02 0.13 0.03 0.23 0.42 0.48 0.00 0.59 0.10 0.34 0.07 0.18 0.64 0.47 0.00 0.54
patient.clinical_cqcf.histological_type 0.01 0.08 0.02 0.35 0.29 0.44 0.68 0.04 0.63 0.11 0.20 0.00 0.25 0.03 0.15 0.14 0.02 0.02 0.72 0.78 0.06
patient.clinical_cqcf.normal_tissue_anatomic_site 0.68 0.69 0.21 0.70 0.69 0.41 0.58 0.67 0.58 0.83 0.38 0.05 0.95 0.23 0.30 0.10 0.27 0.05 0.48 0.47 0.95
patient.drugs.drug.2.drug_name 0.47 0.18 0.14 0.40 0.43 0.99 0.74 0.30 0.49 0.05 0.10 0.22 0.31 0.19 0.80 0.33 0.12 0.03 0.52 0.98 0.40
patient.drugs.drug.drug_name 0.31 0.23 0.39 0.08 0.12 0.14 0.08 0.48 0.10 0.06 0.41 0.13 0.12 0.34 0.05 0.64 0.44 0.64 0.38 0.69 0.01
patient.drugs.drug.prescribed_dose_units 0.68 0.68 0.05 0.03 0.07 0.17 0.25 0.13 0.13 0.59 0.21 0.35 0.53 0.69 0.27 0.22 0.36 0.32 0.29 0.11 0.38
patient.follow_ups.follow_up.2.lost_follow_up 0.28 0.42 0.44 0.12 0.13 0.03 0.18 0.76 0.14 0.48 0.95 0.29 0.38 0.35 0.20 0.95 0.82 0.08 0.40 0.20 0.40
patient.follow_ups.follow_up.2.method_of_curative_tx 0.10 0.01 0.25 0.61 0.43 0.24 0.76 0.32 0.84 0.06 0.07 0.10 0.26 0.02 0.24 0.60 0.87 0.30 0.21 0.25 0.01
patient.follow_ups.follow_up.2.new_tumor_events.new_tumor_event_after_initial_treatment 0.03 0.05 0.20 0.23 0.22 0.76 0.47 0.10 0.68 0.01 0.33 0.05 0.10 0.08 0.75 0.44 0.14 0.15 0.76 0.98 0.12
patient.follow_ups.follow_up.2.radiation_therapy 0.04 0.13 0.28 0.30 0.21 0.59 0.39 0.19 0.36 0.20 0.97 0.22 0.67 0.09 0.78 0.28 0.22 0.04 0.34 0.92 0.33
patient.follow_ups.follow_up.lost_follow_up 0.96 0.91 0.04 0.09 0.11 0.57 0.07 0.02 0.26 0.41 0.28 0.13 1.00 0.18 0.03 0.01 0.07 0.14 0.43 0.54 0.29
patient.follow_ups.follow_up.new_tumor_event_after_initial_treatment 0.88 0.43 0.53 0.52 0.54 0.98 0.58 0.04 0.86 0.59 0.40 0.47 0.97 0.51 0.56 0.11 0.39 0.89 0.11 0.71 0.21
patient.follow_ups.follow_up.new_tumor_events.new_tumor_event_after_initial_treatment 0.02 0.01 0.01 0.06 0.05 0.59 0.34 0.01 0.37 0.01 0.04 0.01 0.60 0.00 0.49 0.03 0.06 0.02 0.73 0.26 0.02
patient.follow_ups.follow_up.radiation_therapy 0.02 1.00 0.02 0.23 0.34 0.01 0.24 0.06 0.03 0.65 0.91 0.00 0.84 0.08 0.04 0.12 0.04 0.04 0.97 0.08 0.23
patient.gender 0.21 0.91 0.01 0.14 0.14 0.00 0.02 0.21 0.02 0.58 0.14 0.01 0.34 0.13 0.04 0.04 0.28 0.26 0.25 0.00 0.83
patient.histological_type 0.01 0.08 0.02 0.35 0.29 0.44 0.68 0.04 0.63 0.11 0.20 0.00 0.25 0.03 0.15 0.14 0.02 0.02 0.72 0.78 0.06
patient.hpv_status_by_p16_testing 0.03 0.05 0.09 0.60 0.54 0.61 0.75 0.02 0.82 0.22 0.19 0.12 0.98 0.06 0.48 0.14 0.60 0.41 0.66 0.75 0.07
patient.icd_10 0.09 0.80 0.00 0.30 0.30 0.00 0.13 0.01 0.10 0.45 0.58 0.00 0.16 0.08 0.24 0.01 0.04 0.47 0.71 0.00 0.68
patient.icd_o_3_histology 0.07 0.23 0.10 0.02 0.02 0.12 0.01 0.02 0.13 0.03 0.80 0.04 0.10 0.23 0.03 0.22 0.03 0.04 0.29 0.40 0.07
patient.icd_o_3_site 0.09 0.80 0.00 0.30 0.30 0.00 0.13 0.01 0.10 0.45 0.58 0.00 0.16 0.08 0.24 0.01 0.04 0.47 0.71 0.00 0.68
patient.laterality 0.21 0.35 0.09 0.18 0.16 0.96 0.39 0.06 0.51 0.14 0.14 0.12 0.52 0.06 0.89 0.15 0.02 0.07 0.66 0.76 0.04
patient.lymphnode_dissection_method_left 0.90 0.90 0.17 0.59 0.61 0.08 0.30 0.64 0.24 0.88 0.93 0.09 0.55 0.54 0.04 0.46 0.24 0.70 0.48 0.08 0.70
patient.lymphnode_neck_dissection 0.68 0.06 0.52 0.77 0.83 0.93 0.90 0.82 0.69 0.22 0.09 0.82 0.63 0.53 0.12 0.81 0.97 0.21 0.02 0.42 0.39
patient.lymphovascular_invasion_present 0.48 0.11 0.23 0.22 0.24 0.04 0.12 0.67 0.03 0.20 0.96 0.10 0.17 0.47 0.70 0.39 0.13 0.29 0.45 0.48 0.70
patient.margin_status 0.12 0.50 0.10 0.48 0.42 0.76 0.69 0.06 0.95 0.41 0.54 0.03 0.21 0.33 0.68 0.15 0.02 0.07 0.53 0.62 0.27
patient.neoplasm_histologic_grade 0.12 0.47 0.00 0.18 0.16 0.00 0.08 0.10 0.01 0.44 0.48 0.00 0.14 0.14 0.22 0.01 0.06 0.18 0.67 0.02 0.51
patient.perineural_invasion_present 0.03 0.00 0.40 0.21 0.18 0.81 0.34 0.31 0.14 0.01 0.03 0.31 0.18 0.04 0.71 0.58 0.89 0.34 0.10 1.00 0.88
patient.person_neoplasm_cancer_status 0.07 0.03 0.71 0.24 0.20 0.16 0.18 0.76 0.17 0.11 0.14 0.67 0.30 0.59 0.57 0.95 0.68 0.21 0.14 0.57 0.52
patient.postoperative_rx_tx 0.67 0.04 0.40 0.09 0.06 0.04 0.16 0.47 0.02 0.01 0.94 0.73 0.14 0.31 0.66 0.50 0.92 0.25 0.73 0.04 0.59
patient.presence_of_pathological_nodal_extracapsular_spread 0.39 0.80 0.18 0.37 0.40 0.37 0.29 0.03 0.32 0.54 0.65 0.21 0.48 0.22 0.74 0.22 0.38 0.56 0.95 0.84 0.17
patient.primary_lymph_node_presentation_assessment 0.84 0.07 0.47 0.89 0.91 0.79 0.64 0.93 0.72 0.18 0.01 0.52 0.35 0.18 0.16 0.69 0.83 0.33 0.00 0.11 0.31
patient.radiation_therapy 0.72 0.06 0.30 0.10 0.10 0.02 0.20 0.88 0.07 0.02 0.89 0.27 0.28 0.88 0.26 0.40 0.40 0.72 0.75 0.06 0.53
patient.radiations.radiation.2.radiation_type 0.64 0.56 0.82 0.01 0.01 0.03 0.05 0.03 0.02 0.01 0.90 0.55 0.10 0.30 0.48 0.32 0.10 0.18 0.06 0.37 0.28
patient.radiations.radiation.measure_of_response 0.74 0.99 0.01 0.45 0.51 0.03 0.26 0.08 0.20 0.99 0.27 0.11 0.50 0.48 0.83 0.03 0.15 0.11 0.69 0.58 0.12
patient.radiations.radiation.radiation_type 0.02 0.01 0.43 0.00 0.00 0.03 0.01 0.01 0.01 0.00 0.09 0.58 0.04 0.13 0.34 0.26 0.17 0.17 0.56 0.20 0.05
patient.radiations.radiation.units 0.16 0.12 0.95 0.12 0.10 0.19 0.17 0.23 0.23 0.03 0.34 0.79 0.34 0.45 0.49 0.83 0.74 0.94 0.56 0.36 0.39
patient.stage_event.clinical_stage 0.74 0.64 0.01 0.10 0.10 0.01 0.04 0.03 0.01 0.27 0.72 0.11 0.04 0.63 0.08 0.02 0.08 0.33 0.33 0.13 0.63
patient.stage_event.pathologic_stage 0.08 0.06 0.06 0.19 0.19 0.05 0.11 0.23 0.05 0.23 0.61 0.01 0.65 0.19 0.13 0.24 0.02 0.45 0.15 0.10 0.44
patient.stage_event.tnm_categories.clinical_categories.clinical_m 0.09 0.39 0.19 0.29 0.21 0.76 0.55 0.04 0.78 0.14 0.51 0.06 0.47 0.12 0.89 0.24 0.09 0.12 0.69 0.85 0.02
patient.stage_event.tnm_categories.clinical_categories.clinical_t 0.63 0.32 0.61 0.05 0.05 0.16 0.03 0.27 0.11 0.09 0.38 0.49 0.82 0.51 0.08 0.29 0.31 0.60 0.55 0.23 0.08
patient.stage_event.tnm_categories.pathologic_categories.pathologic_m 0.38 0.31 0.09 0.01 0.01 0.21 0.03 0.00 0.05 0.02 0.49 0.11 0.02 0.15 0.41 0.06 0.03 0.06 0.29 0.43 0.08
patient.stage_event.tnm_categories.pathologic_categories.pathologic_n 0.00 0.00 0.03 0.12 0.10 0.02 0.13 0.21 0.07 0.04 0.03 0.01 0.23 0.01 0.22 0.15 0.08 0.09 0.07 0.24 0.87
patient.tissue_prospective_collection_indicator 0.01 0.04 0.18 0.23 0.18 0.86 0.60 0.14 0.61 0.06 0.12 0.04 0.25 0.02 0.69 0.40 0.18 0.01 0.53 0.78 0.24
patient.tissue_retrospective_collection_indicator 0.01 0.04 0.18 0.23 0.18 0.86 0.60 0.14 0.61 0.06 0.12 0.04 0.25 0.02 0.69 0.40 0.18 0.01 0.53 0.78 0.24
patient.tissue_source_site 0.49 0.70 0.24 0.00 0.00 0.03 0.01 0.03 0.02 0.01 0.97 0.11 0.52 0.11 0.71 0.48 0.09 0.06 0.88 0.19 0.17
patient.vital_status 0.01 0.03 0.05 0.34 0.29 0.67 0.34 0.00 1.00 0.08 0.23 0.02 0.48 0.04 0.52 0.14 0.43 0.02 0.56 0.77 0.14
patient.hpv_test_results.hpv_test_result.hpv_status 0.70 0.84 0.43 0.13 0.15 0.02 0.12 0.51 0.07 0.57 0.10 0.31 0.42 0.46 0.44 0.88 0.75 0.83 0.06 0.15 0.14
patient.bcr_canonical_check.bcr_patient_canonical_status 0.05 0.62 0.36 0.54 0.43 0.58 0.36 0.12 0.91 0.84 0.48 0.53 0.39 0.37 0.08 0.55 0.49 0.02 0.05 0.64 0.40
patient.biospecimen_cqcf.consent_or_death_status 0.05 0.31 0.03 0.62 0.58 0.46 0.60 0.01 0.56 0.51 0.55 0.02 0.96 0.09 0.55 0.08 0.19 0.08 0.66 0.66 0.89
patient.biospecimen_cqcf.digital_image_submitted 0.02 0.05 0.71 0.24 0.16 0.37 0.30 0.09 0.62 0.08 0.72 0.44 0.44 0.07 0.49 0.68 0.96 0.01 0.58 0.71 0.09
patient.biospecimen_cqcf.frozen_specimen_anatomic_site 0.11 0.54 0.01 0.24 0.28 0.02 0.13 0.03 0.23 0.42 0.48 0.00 0.59 0.10 0.34 0.07 0.18 0.64 0.47 0.00 0.54
patient.biospecimen_cqcf.histological_type 0.01 0.08 0.02 0.35 0.29 0.44 0.68 0.04 0.63 0.11 0.20 0.00 0.25 0.03 0.15 0.14 0.02 0.02 0.72 0.78 0.06
patient.biospecimen_cqcf.normal_controls.normal_control.extracted_dna.ncedna_dna_qm 0.74 0.57 0.22 0.04 0.02 0.04 0.09 0.27 0.06 0.02 0.91 0.45 0.13 0.68 0.91 0.32 0.89 0.16 0.71 0.26 0.19
patient.biospecimen_cqcf.normal_controls.normal_control.normal_tissue.normal_tissue_anatomic_site 0.54 0.53 0.12 0.94 0.95 0.35 0.77 0.42 0.99 0.56 0.22 0.01 0.55 0.16 0.40 0.07 0.04 0.10 0.49 0.37 0.89
patient.biospecimen_cqcf.path_confirm_tumor_nuclei_metrics 0.21 0.19 0.14 0.13 0.15 0.67 0.08 0.05 0.34 0.15 0.64 0.20 0.39 0.34 0.31 0.12 0.12 0.34 0.49 0.45 0.26
patient.biospecimen_cqcf.site_of_disease_description 0.02 0.22 0.01 0.01 0.01 0.00 0.01 0.01 0.05 0.03 0.41 0.00 0.42 0.08 0.27 0.07 0.17 0.43 0.54 0.00 0.53
patient.biospecimen_cqcf.top_slide_submitted 0.00 0.01 0.57 0.07 0.03 0.07 0.04 0.11 0.20 0.00 0.82 0.95 0.30 0.14 0.39 0.43 0.37 0.02 0.76 0.25 0.01
patient.samples.sample.2.portions.portion.analytes.analyte.2.aliquots.aliquot.plate_id 0.09 0.29 0.14 0.00 0.00 0.56 0.04 0.00 0.25 0.00 0.53 0.10 0.21 0.06 0.65 0.10 0.06 0.01 0.85 0.75 0.26
patient.samples.sample.2.portions.portion.analytes.analyte.2.dna.pcr_amplification_successful 0.00 0.00 0.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.24 0.01 0.00 0.00 0.01 0.01 0.00 0.00 0.03 0.02 0.00
patient.samples.sample.2.portions.portion.analytes.analyte.2.spectrophotometer_method 0.29 0.63 0.04 0.40 0.35 0.48 0.97 0.01 0.88 0.44 0.90 0.02 0.29 0.03 0.73 0.04 0.13 0.02 0.79 0.67 0.15
patient.samples.sample.2.portions.portion.analytes.analyte.aliquots.aliquot.2.plate_id 0.09 0.21 0.14 0.00 0.00 0.26 0.01 0.00 0.06 0.00 0.40 0.07 0.10 0.04 0.64 0.07 0.05 0.00 0.77 0.49 0.17
patient.samples.sample.2.portions.portion.analytes.analyte.aliquots.aliquot.2.plate_row 0.40 0.70 0.61 0.93 0.92 0.87 0.95 0.39 0.94 0.92 0.69 0.30 0.96 0.78 0.65 0.59 0.02 0.14 0.20 0.91 0.96
patient.samples.sample.2.portions.portion.analytes.analyte.aliquots.aliquot.plate_id 0.09 0.21 0.14 0.00 0.00 0.26 0.01 0.00 0.06 0.00 0.40 0.07 0.10 0.04 0.64 0.07 0.05 0.00 0.77 0.49 0.17
patient.samples.sample.2.portions.portion.analytes.analyte.aliquots.aliquot.plate_row 0.40 0.70 0.61 0.93 0.92 0.87 0.95 0.39 0.94 0.92 0.69 0.30 0.96 0.78 0.65 0.59 0.02 0.14 0.20 0.91 0.96
patient.samples.sample.2.portions.portion.analytes.analyte.dna.pcr_amplification_successful 0.00 0.00 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.19 0.01 0.00 0.00 0.05 0.08 0.00 0.00 0.12 0.02 0.00
patient.samples.sample.2.portions.portion.analytes.analyte.protocols.protocol.experimental_protocol_type 0.00 0.02 0.19 0.00 0.00 0.21 0.01 0.00 0.08 0.00 0.27 0.02 0.03 0.00 0.19 0.20 0.04 0.00 0.33 0.39 0.01
patient.samples.sample.2.portions.portion.analytes.analyte.spectrophotometer_method 0.06 0.02 0.81 0.01 0.01 0.02 0.03 0.21 0.02 0.00 0.04 0.82 0.03 0.12 0.37 0.93 0.35 0.46 0.88 0.23 0.19
patient.samples.sample.3.portions.portion.analytes.analyte.2.aliquots.aliquot.2.bcr_aliquot_barcode 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.2.aliquots.aliquot.2.bcr_aliquot_uuid 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.2.aliquots.aliquot.plate_row 0.72 0.51 0.47 0.44 0.44 0.02 0.07 0.95 0.11 0.72 0.61 0.31 0.67 0.56 0.36 0.39 0.55 0.23 0.53 0.43 0.34
patient.samples.sample.3.portions.portion.analytes.analyte.2.analyte_type 0.10 0.35 0.30 0.23 0.21 0.88 0.70 0.10 0.78 0.28 0.58 0.20 0.55 0.10 0.29 0.23 0.57 0.01 0.94 0.86 0.34
patient.samples.sample.3.portions.portion.analytes.analyte.2.analyte_type_id 0.10 0.35 0.30 0.23 0.21 0.88 0.70 0.10 0.78 0.28 0.58 0.20 0.55 0.10 0.29 0.23 0.57 0.01 0.94 0.86 0.34
patient.samples.sample.3.portions.portion.analytes.analyte.2.protocols.protocol.experimental_protocol_type 0.10 0.35 0.30 0.23 0.21 0.88 0.70 0.10 0.78 0.28 0.58 0.20 0.55 0.10 0.29 0.23 0.57 0.01 0.94 0.86 0.34
patient.samples.sample.3.portions.portion.analytes.analyte.2.spectrophotometer_method 0.55 0.85 0.81 0.85 0.84 0.82 0.70 0.99 0.97 0.95 0.87 0.91 0.61 0.77 0.90 0.76 0.93 0.05 0.94 0.95 0.80
patient.samples.sample.3.portions.portion.analytes.analyte.3.aliquots.aliquot.bcr_aliquot_barcode 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.3.aliquots.aliquot.bcr_aliquot_uuid 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.3.aliquots.aliquot.plate_row 0.12 0.03 0.02 0.22 0.26 0.17 0.10 0.16 0.10 0.06 0.19 0.09 0.08 0.03 0.02 0.18 0.14 0.73 0.31 0.25 0.87
patient.samples.sample.3.portions.portion.analytes.analyte.3.bcr_analyte_barcode 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.3.bcr_analyte_uuid 0.15 0.15 0.11 0.26 0.31 0.30 0.32 0.24 0.10 0.18 0.88 0.10 0.06 0.55 0.46 0.23 0.04 0.45 0.90 0.87 0.41
patient.samples.sample.3.portions.portion.analytes.analyte.aliquots.aliquot.3.plate_row 0.59 0.51 0.01 0.39 0.40 0.02 0.11 0.28 0.17 0.52 0.72 0.02 0.23 0.16 0.57 0.11 0.08 0.47 0.74 0.59 0.74
patient.samples.sample.oct_embedded 0.55 0.22 0.03 0.21 0.28 0.94 0.36 0.06 0.37 0.17 0.05 0.10 0.44 0.11 0.76 0.02 0.04 0.01 0.67 0.92 0.46
patient.samples.sample.portions.portion.analytes.analyte.2.aliquots.aliquot.2.plate_id 0.03 0.08 0.10 0.00 0.00 0.18 0.00 0.00 0.05 0.00 0.29 0.03 0.07 0.01 0.58 0.02 0.06 0.00 0.64 0.39 0.04
patient.samples.sample.portions.portion.analytes.analyte.2.aliquots.aliquot.2.plate_row 0.05 0.64 0.14 0.97 0.95 0.41 0.80 0.33 0.84 0.95 0.47 0.05 0.99 0.30 0.44 0.20 0.54 0.13 0.41 0.32 0.10
patient.samples.sample.portions.portion.analytes.analyte.2.aliquots.aliquot.plate_id 0.03 0.08 0.10 0.00 0.00 0.18 0.00 0.00 0.05 0.00 0.29 0.03 0.07 0.01 0.58 0.02 0.06 0.00 0.64 0.39 0.04
patient.samples.sample.portions.portion.analytes.analyte.2.aliquots.aliquot.plate_row 0.03 0.62 0.15 0.99 0.98 0.40 0.82 0.48 0.88 0.98 0.49 0.05 0.98 0.34 0.45 0.32 0.43 0.19 0.35 0.30 0.13
patient.samples.sample.portions.portion.analytes.analyte.3.aliquots.aliquot.plate_id 0.04 0.10 0.13 0.00 0.00 0.23 0.01 0.00 0.07 0.00 0.35 0.04 0.09 0.01 0.64 0.03 0.08 0.00 0.71 0.47 0.06
patient.samples.sample.portions.portion.analytes.analyte.3.aliquots.aliquot.plate_row 0.23 0.37 0.86 1.00 0.98 0.95 1.00 0.83 0.93 0.93 0.72 0.93 1.00 0.98 0.94 0.85 0.59 0.02 0.70 0.78 0.05
patient.samples.sample.portions.portion.analytes.analyte.3.dna.pcr_amplification_successful 0.00 0.00 0.07 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.19 0.01 0.00 0.00 0.01 0.02 0.00 0.00 0.04 0.01 0.00
patient.samples.sample.portions.portion.analytes.analyte.3.protocols.protocol.experimental_protocol_type 0.88 0.73 0.56 0.06 0.07 0.10 0.05 0.10 0.13 0.24 0.98 0.93 0.74 0.64 0.03 0.08 0.34 0.23 0.14 0.36 0.79
patient.samples.sample.portions.portion.analytes.analyte.3.spectrophotometer_method 0.36 0.69 0.03 0.36 0.38 0.48 0.85 0.01 0.95 0.48 0.78 0.02 0.41 0.03 0.70 0.02 0.11 0.05 0.76 0.57 0.16
patient.samples.sample.portions.portion.analytes.analyte.aliquots.aliquot.2.plate_id 0.03 0.08 0.10 0.00 0.00 0.18 0.00 0.00 0.05 0.00 0.29 0.03 0.07 0.01 0.58 0.02 0.06 0.00 0.64 0.39 0.04
patient.samples.sample.portions.portion.analytes.analyte.aliquots.aliquot.3.plate_id 0.03 0.08 0.10 0.00 0.00 0.18 0.00 0.00 0.05 0.00 0.29 0.03 0.07 0.01 0.58 0.02 0.06 0.00 0.64 0.39 0.04
patient.samples.sample.portions.portion.analytes.analyte.aliquots.aliquot.4.plate_id 0.71 0.86 0.11 0.89 0.85 0.95 1.00 0.04 0.97 0.75 0.59 0.22 0.88 0.27 1.00 0.08 0.36 0.31 0.78 0.69 0.61
patient.samples.sample.portions.portion.analytes.analyte.aliquots.aliquot.plate_id 0.03 0.08 0.10 0.00 0.00 0.18 0.00 0.00 0.05 0.00 0.29 0.03 0.07 0.01 0.58 0.02 0.06 0.00 0.64 0.39 0.04
patient.samples.sample.portions.portion.analytes.analyte.dna.pcr_amplification_successful 0.00 0.00 0.10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.19 0.01 0.00 0.00 0.05 0.08 0.00 0.00 0.12 0.02 0.00
patient.samples.sample.portions.portion.analytes.analyte.spectrophotometer_method 0.02 0.02 0.31 0.01 0.01 0.16 0.05 0.03 0.05 0.00 0.01 0.24 0.02 0.03 0.82 0.26 0.05 0.32 0.75 0.56 0.18
patient.samples.sample.portions.portion.slides.slide.2.bcr_slide_barcode 0.27 0.34 0.12 0.28 0.35 0.30 0.25 0.21 0.12 0.31 0.98 0.09 0.05 0.64 0.36 0.22 0.05 0.48 0.98 0.94 0.68
patient.samples.sample.portions.portion.slides.slide.2.bcr_slide_uuid 0.27 0.34 0.12 0.28 0.35 0.30 0.25 0.21 0.12 0.31 0.98 0.09 0.05 0.64 0.36 0.22 0.05 0.48 0.98 0.94 0.68
patient.samples.sample.portions.portion.slides.slide.2.image_file_name 0.27 0.34 0.12 0.28 0.35 0.30 0.25 0.21 0.12 0.31 0.98 0.09 0.05 0.64 0.36 0.22 0.05 0.48 0.98 0.94 0.68
patient.samples.sample.portions.portion.slides.slide.section_location 0.03 0.21 0.11 0.00 0.00 0.14 0.01 0.00 0.13 0.01 0.57 0.05 0.04 0.06 0.11 0.11 0.02 0.09 0.06 0.07 0.06
patient.samples.sample.portions.shipment_portion.plate_id 0.00 0.02 0.26 0.00 0.00 0.21 0.00 0.00 0.11 0.00 0.32 0.21 0.33 0.02 0.17 0.12 0.12 0.00 0.07 0.27 0.01

RAV Exploration

ind <- 1125
findStudiesInCluster(RAVmodel, ind, studyTitle = TRUE)
##   studyName PC Variance explained (%)
## 1 SRP028336  3                   8.22
## 2 SRP056477  1                  40.52
##                                                                          title
## 1                  Large-scale multi-species survey of metabolome and lipidome
## 2 Distinct brain transcriptome profiles in c9orf72-associated and sporadic ALS
subsetEnrichedPathways(RAVmodel, ind, include_nes = TRUE) %>% as.data.frame
##                                       RAV1125.Description RAV1125.NES
## Up_1          REACTOME_CLASS_A_1_RHODOPSIN_LIKE_RECEPTORS    2.442230
## Up_2                         REACTOME_GPCR_LIGAND_BINDING    2.395486
## Up_3                 REACTOME_G_ALPHA_I_SIGNALLING_EVENTS    2.163685
## Up_4                           REACTOME_SIGNALING_BY_GPCR    2.155312
## Up_5                               BENPORATH_PRC2_TARGETS    2.086631
## Up_6                      KIM_ALL_DISORDERS_CALB1_CORR_UP    2.086041
## Up_7                      SMID_BREAST_CANCER_LUMINAL_B_DN    2.030036
## Up_8            CHARAFE_BREAST_CANCER_LUMINAL_VS_BASAL_DN    1.967255
## Up_9  FLECHNER_BIOPSY_KIDNEY_TRANSPLANT_REJECTED_VS_OK_DN    1.947022
## Up_10                                                <NA>          NA
drawWordcloud(RAVmodel, ind)

ind <- 4486
findStudiesInCluster(RAVmodel, ind, studyTitle = TRUE)
##   studyName PC Variance explained (%)
## 1 SRP165962 11                   1.56
## 2 SRP183146 11                   1.57
##                                                                                                                 title
## 1  Genome-wide transcriptional analysis of human iPSC-derived healthy control vs. schizophrenia cortical interneurons
## 2 Genome-wide transcriptional analysis of human iPSC-derived healthy control vs. schizophrenia cortical interneurons.
subsetEnrichedPathways(RAVmodel, ind, include_nes = TRUE) %>% as.data.frame
##                   RAV4486.Description RAV4486.NES
## Up_1  COLDREN_GEFITINIB_RESISTANCE_DN   -1.917893
## Up_2                             <NA>          NA
## Up_3                             <NA>          NA
## Up_4                             <NA>          NA
## Up_5                             <NA>          NA
## Up_6                             <NA>          NA
## Up_7                             <NA>          NA
## Up_8                             <NA>          NA
## Up_9                             <NA>          NA
## Up_10                            <NA>          NA
drawWordcloud(RAVmodel, ind)
## Warning in wordcloud::wordcloud(words = all$word, freq = all$freq, scale =
## scale, : Induced Pluripotent Stem Cells could not be fit on page. It will not
## be plotted.