gsva_merged <- merge(gsva_dog_c5$es.obs, gsva_human_c5$es.obs, by.x=0, by.y=0)
>dim(gsva_merged)
[1] 1452 443
sample_data_merged <- data.frame(rbind(col_data_dog, col_data_human),
species=c(rep("dog", nrow(col_data_dog)),
rep("human", nrow(col_data_human))))
>head(sample_data_merged, n=15)
condition species
TCC.1 cancer dog
TCC.2 cancer dog
TCC.3 cancer dog
TCC.4 cancer dog
TCC.5 cancer dog
TCC.6 cancer dog
TCC.7 cancer dog
normal.1 normal dog
normal.2 normal dog
normal.3 normal dog
UCCB_1 cancer human
UCCB_2 cancer human
UCCB_3 cancer human
UCCB_4 cancer human
UCCB_5 cancer human
>dim(sample_data_merged)
[1] 443 2
In the above example R code, the "rep" function creates a
vector by replicating its function argument, and "rbind" func-
tion combines two data frames by stacking them vertically.
- Analyze the merged, GSVA-transformed data using Multidi-
mensional Scaling [31] in two dimensions (also known as
Principal Coordinates Analysis or PCoA). PCoA gives a planar
coordinate location for each mRNA-seq sample such that the
distance between each pair of samples in the plane corresponds
(as closely as possible) to a quantitative dissimilarity measure
between their respective mRNA-seq samples. The R command
for this step, and example output, are as follows:
pcoa_results <- cmdscale(dist(t(gsva_merged)))$points
>head(pcoa_results, n=15)
[,1] [,2]
TCC.1 -5.2 -1
TCC.2 -4.0 -1
TCC.3 -2.3 6
TCC.4 3.7 3
TCC.5 -2.7 2
TCC.6 0.3 5
TCC.7 3.7 2
normal.1 -1.1 -4
normal.2 1.7 -5
normal.3 3.9 -5
UCCB_1 2.2 2
UCCB_2 -6.0 6
UCCB_3 -7.7 6
UCCB_4 -3.0 6
UCCB_5 -9.3 -5
>dim(pcoa_results)
[1] 443 2
300 Stephen A. Ramsey