Skip to contents

Wrapping up a new list of projection matrices with the list computed from the function of sjdWrap

Usage

sjdWrapProjection(
  data.list.template,
  data.list.projection,
  species.template,
  species.vec.projection,
  geneType.template,
  geneType.vec.projection
)

Arguments

data.list.template

input list of expression matrices from the output of the sjdWrap function

data.list.projection

input list of expression matrices needed to be matched with data.list.template

species.template

character of species type from the sjdWrap function

species.vec.projection

list of species of each matrix to be projected

geneType.template

character of gene/rowname type from the sjdWrap function

geneType.vec.projection

list of output gene/rowname type of each matrix to be projected

Value

A list of expression matrices (of different species) with only shared genes to be projected

Examples


## Load NeuroGenesis4 data into R
data(NeuroGenesis4)

## sjdWrap of the training data sets
SJDdataIN = sjdWrap(
data.list = NeuroGenesis4,
species.vector=c("human","human","human","mouse"),
geneType.vector=c("symbol","ensembl","symbol","symbol"),
geneType.out="symbol",
species.out="human")
#> Using biomaRt to connect gene IDs across 4 datasets:
#> Getting biomaRt IDs for dataset 1 
#> You have input  40  genes
#> We found  40  matches
#> 1  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 2 
#> You have input  40  genes
#> We found  37  matches
#> 1  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 3 
#> You have input  40  genes
#> We found  39  matches
#> 0  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 4 
#> You have input  40  genes
#> We found  31  matches
#> 0  of those are duplicates and only keeping the 1st of each
#> constructed 4 tables of cross-species matching genes
#> we found 24 shared genes in 4 datasets
#> new data list of 4 datasets constructed

## Sample from data, serving as the projection expression matrices
NeuroGenesis4.sample = NeuroGenesis4
NeuroGenesis4.sample[[1]] = NeuroGenesis4.sample[[1]][-5,]
rownames(NeuroGenesis4.sample[[1]])[5] = paste0(rownames(NeuroGenesis4.sample[[1]])[5], ".test")

NeuroGenesis4.sample[[2]] = NeuroGenesis4.sample[[2]][-10,]
rownames(NeuroGenesis4.sample[[2]])[10] = paste0(rownames(NeuroGenesis4.sample[[2]])[10], ".test")

NeuroGenesis4.sample[[3]] = NeuroGenesis4.sample[[3]][-15,]
rownames(NeuroGenesis4.sample[[3]])[15] = paste0(rownames(NeuroGenesis4.sample[[3]])[15], ".test")

NeuroGenesis4.sample[[4]] = NeuroGenesis4.sample[[4]][-20,]
rownames(NeuroGenesis4.sample[[4]])[20] = paste0(rownames(NeuroGenesis4.sample[[4]])[20], ".test")

SJDdataProjection = sjdWrapProjection(
SJDdataIN, NeuroGenesis4.sample, "human", c("human","human","human","mouse"),
"symbol", c("symbol","ensembl","symbol","symbol"))
#> Using biomaRt to connect gene IDs across 4 datasets:
#> Getting biomaRt IDs for dataset 1 
#> You have input  39  genes
#> We found  38  matches
#> 1  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 2 
#> You have input  39  genes
#> We found  35  matches
#> 1  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 3 
#> You have input  39  genes
#> We found  37  matches
#> 0  of those are duplicates and only keeping the 1st of each
#> Getting biomaRt IDs for dataset 4 
#> You have input  39  genes
#> We found  29  matches
#> 0  of those are duplicates and only keeping the 1st of each
#> constructed 4 tables of cross-species matching genes