Lily’s array.
When we write message false all the text about “Loading Package X” or “Need this package” and so on are ommitted.
library(dplyr)
library(stringr)
library(readr)
library(tidyr)
library(magrittr)
library(oligo)
library(preprocessCore)
library(limma)
source('/home/qqydk/lib/getTopTable_GeneInfo.R')
source('/home/qqydk/lib/getGeneInfo.R')
source('/home/qqydk/lib/printCons.R')
source('/home/qqydk/lib/QC_eset_function.R')
So far, it does not seem necessary to load the annotation source files
WORKING and ORIGIN path are the same on the server such that results are stored with input data. This makes it possible to run the script on the server or locally bu just changing these two path variables # ORIGINO.PATH <- paste0(‘/mnt/T-drive/qqydk/ad/INTERNALDATA/’)
ORIGINO.PATH <- paste0('/mnt/T-drive/qqydk/ad/INTERNALDATA/')
WORKING.PATH <- paste0('/home/qqydk/rawData/')
PROJECT <- 'A3976'
ORIGINO.PROJECT.PATH <- paste0(ORIGINO.PATH, PROJECT, '/')
WORKING.PROJECT.PATH <- paste0(WORKING.PATH, PROJECT, '/')
# QC_images(WORKING.PATH)
Wierdly enough, I managed to obtain the QC_norm, image_raw, QC_raw. All those folders have been stored in /home/qqydk/rawData/A3976/CEL. By analyzing the Index.html of QC_norm y QC_raw, as well as looking at the colour of the pictures (darker means worse), we can identify the outliers. 1. Pseudoimages By just looking at the pictures, we can see that file number 7* has a darker blue colour. This agrees with the previous analysis performed by TL, who identified it as an outlier. **CELfile n7 -> OUTLIER. I remember that there was a second outlier. I think it was CELfile n22, however, I can also see a different colour in file 18. 2. Indexes A false color heatmap of the distances between arrays is created for the raw and normalized data. It crearly shows that the arrays 7 and 22 are outliers with a star(). For more information. refer to the specific fils. “C:- LEO Pharma A S3976_norm" “C:- LEO Pharma A S3976_raw"
outliers<-c(7,22)
All these functions belong to the package “plyr”. Steven has the Cheat Sheet hung on the wall.
df.anno <- read_delim(
paste0(
WORKING.PROJECT.PATH,
'sample_annotation.txt'),
col_names = T,
delim = '\t') %>%
arrange(`CHP File`)
## Parsed with column specification:
## cols(
## `CHP File` = col_character(),
## `Array Id` = col_character(),
## Sample_ID = col_double(),
## `Time (h)` = col_double(),
## Rx = col_character(),
## `Conc (ng/ml)` = col_double(),
## Sample = col_character(),
## `Rx Ctrl6-24h` = col_character()
## )
df.anno
## # A tibble: 24 x 8
## `CHP File` `Array Id` Sample_ID `Time (h)` Rx `Conc (ng/ml)` Sample
## <chr> <chr> <dbl> <dbl> <chr> <dbl> <chr>
## 1 A3976_01.… a523eb17-… 1 6 ctrl 0 1 6h …
## 2 A3976_02.… 8fd31aa0-… 2 6 ctrl 0 2 6h …
## 3 A3976_03.… 0da3fe65-… 3 6 ctrl 0 3 6h …
## 4 A3976_04.… efaf1a1f-… 4 6 IL33 100 4 6h …
## 5 A3976_05.… 01ad4c69-… 5 6 IL33 100 5 6h …
## 6 A3976_06.… 604e69e7-… 6 6 IL33 100 6 6h …
## 7 A3976_07.… 870c887c-… 7 6 IL22 50 7 6h …
## 8 A3976_08.… 298fb729-… 8 6 IL22 50 8 6h …
## 9 A3976_09.… 4e87212e-… 9 6 IL22 50 9 6h …
## 10 A3976_10.… 362278d6-… 10 6 IL13 50 10 6h…
## # … with 14 more rows, and 1 more variable: `Rx Ctrl6-24h` <chr>
file.cel <- list.celfiles(
paste0(WORKING.PROJECT.PATH,
'CEL'),
full.names=T, listGzipped = T)
data.raw <- read.celfiles(file.cel)
## Loading required package: pd.hugene.2.1.st
## Loading required package: RSQLite
## Loading required package: DBI
## Platform design info loaded.
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_01.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_02.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_03.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_04.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_05.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_06.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_07.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_08.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_09.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_10.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_11.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_12.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_13.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_14.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_15.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_16.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_17.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_18.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_19.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_20.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_21.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_22.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_23.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_24.CEL
data.raw
## GeneFeatureSet (storageMode: lockedEnvironment)
## assayData: 1416100 features, 24 samples
## element names: exprs
## protocolData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (24 total)
## varLabels: exprs dates
## varMetadata: labelDescription channel
## phenoData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (24 total)
## varLabels: index
## varMetadata: labelDescription channel
## featureData: none
## experimentData: use 'experimentData(object)'
## Annotation: pd.hugene.2.1.st
file.cel<-file.cel[-c(7,22)]
file.cel
## [1] "/home/qqydk/rawData/A3976/CEL/A3976_01.CEL"
## [2] "/home/qqydk/rawData/A3976/CEL/A3976_02.CEL"
## [3] "/home/qqydk/rawData/A3976/CEL/A3976_03.CEL"
## [4] "/home/qqydk/rawData/A3976/CEL/A3976_04.CEL"
## [5] "/home/qqydk/rawData/A3976/CEL/A3976_05.CEL"
## [6] "/home/qqydk/rawData/A3976/CEL/A3976_06.CEL"
## [7] "/home/qqydk/rawData/A3976/CEL/A3976_08.CEL"
## [8] "/home/qqydk/rawData/A3976/CEL/A3976_09.CEL"
## [9] "/home/qqydk/rawData/A3976/CEL/A3976_10.CEL"
## [10] "/home/qqydk/rawData/A3976/CEL/A3976_11.CEL"
## [11] "/home/qqydk/rawData/A3976/CEL/A3976_12.CEL"
## [12] "/home/qqydk/rawData/A3976/CEL/A3976_13.CEL"
## [13] "/home/qqydk/rawData/A3976/CEL/A3976_14.CEL"
## [14] "/home/qqydk/rawData/A3976/CEL/A3976_15.CEL"
## [15] "/home/qqydk/rawData/A3976/CEL/A3976_16.CEL"
## [16] "/home/qqydk/rawData/A3976/CEL/A3976_17.CEL"
## [17] "/home/qqydk/rawData/A3976/CEL/A3976_18.CEL"
## [18] "/home/qqydk/rawData/A3976/CEL/A3976_19.CEL"
## [19] "/home/qqydk/rawData/A3976/CEL/A3976_20.CEL"
## [20] "/home/qqydk/rawData/A3976/CEL/A3976_21.CEL"
## [21] "/home/qqydk/rawData/A3976/CEL/A3976_23.CEL"
## [22] "/home/qqydk/rawData/A3976/CEL/A3976_24.CEL"
df.anno<-df.anno[-outliers,]
data.raw<-read.celfiles(file.cel)
## Platform design info loaded.
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_01.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_02.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_03.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_04.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_05.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_06.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_08.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_09.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_10.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_11.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_12.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_13.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_14.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_15.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_16.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_17.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_18.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_19.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_20.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_21.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_23.CEL
## Reading in : /home/qqydk/rawData/A3976/CEL/A3976_24.CEL
data.raw
## GeneFeatureSet (storageMode: lockedEnvironment)
## assayData: 1416100 features, 22 samples
## element names: exprs
## protocolData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (22 total)
## varLabels: exprs dates
## varMetadata: labelDescription channel
## phenoData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (22 total)
## varLabels: index
## varMetadata: labelDescription channel
## featureData: none
## experimentData: use 'experimentData(object)'
## Annotation: pd.hugene.2.1.st
core = transcripts probesets = exon?
IMPORTANT: investigate the arguments of RMA and why we set up normalize to “FALSE”
data.rma<-rma(data.raw, normalize= F, target = 'core')
## Background correcting
## Calculating Expression
data.rma
## ExpressionSet (storageMode: lockedEnvironment)
## assayData: 53617 features, 22 samples
## element names: exprs
## protocolData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (22 total)
## varLabels: exprs dates
## varMetadata: labelDescription channel
## phenoData
## rowNames: A3976_01.CEL A3976_02.CEL ... A3976_24.CEL (22 total)
## varLabels: index
## varMetadata: labelDescription channel
## featureData: none
## experimentData: use 'experimentData(object)'
## Annotation: pd.hugene.2.1.st
data.exp <- exprs(data.rma)
data.norma <- normalize.quantiles.robust(data.exp)
exprs(data.rma) <- data.norma
We have to select “treatment column” from annotation
rx <- make.names(gsub('\\+','_',df.anno$Rx))
rx
## [1] "ctrl" "ctrl" "ctrl" "IL33" "IL33" "IL33" "IL22" "IL22"
## [9] "IL13" "IL13" "IL13" "IL4" "IL4" "IL4" "IL17C" "IL17C"
## [17] "IL17C" "IL17A" "IL17A" "IL17A" "ctrl" "ctrl"
lev <- levels(factor(rx))
lev
## [1] "ctrl" "IL13" "IL17A" "IL17C" "IL22" "IL33" "IL4"
lev_orig <- levels(factor(rx))
lev_orig
## [1] "ctrl" "IL13" "IL17A" "IL17C" "IL22" "IL33" "IL4"
printCons(lev)
## [1] "1: ctrl"
## [1] "2: IL13"
## [1] "3: IL17A"
## [1] "4: IL17C"
## [1] "5: IL22"
## [1] "6: IL33"
## [1] "7: IL4"
lev orders/organizes the factors alphabetically. However, we want all the conditions used (IL13, IL33, and so on) to be compared against the baseline. In this case, control. In other cases: LS, NLS, NN (being NN normal). It does not really matter, because alphabetically, it will compare LS and NLS against normal. However, in our case, we do want to see in the fold-change an INCREASE or DECREASE of expression against the control or untreated sample.
lev <- lev[c(6,5,2,7,4,3,1)]
lev
## [1] "IL33" "IL22" "IL13" "IL4" "IL17C" "IL17A" "ctrl"
printCons(lev)
## [1] "1: IL33"
## [1] "2: IL22"
## [1] "3: IL13"
## [1] "4: IL4"
## [1] "5: IL17C"
## [1] "6: IL17A"
## [1] "7: ctrl"
design <- model.matrix(~0+rx)
colnames(design) <- lev_orig
design
## ctrl IL13 IL17A IL17C IL22 IL33 IL4
## 1 1 0 0 0 0 0 0
## 2 1 0 0 0 0 0 0
## 3 1 0 0 0 0 0 0
## 4 0 0 0 0 0 1 0
## 5 0 0 0 0 0 1 0
## 6 0 0 0 0 0 1 0
## 7 0 0 0 0 1 0 0
## 8 0 0 0 0 1 0 0
## 9 0 1 0 0 0 0 0
## 10 0 1 0 0 0 0 0
## 11 0 1 0 0 0 0 0
## 12 0 0 0 0 0 0 1
## 13 0 0 0 0 0 0 1
## 14 0 0 0 0 0 0 1
## 15 0 0 0 1 0 0 0
## 16 0 0 0 1 0 0 0
## 17 0 0 0 1 0 0 0
## 18 0 0 1 0 0 0 0
## 19 0 0 1 0 0 0 0
## 20 0 0 1 0 0 0 0
## 21 1 0 0 0 0 0 0
## 22 1 0 0 0 0 0 0
## attr(,"assign")
## [1] 1 1 1 1 1 1 1
## attr(,"contrasts")
## attr(,"contrasts")$rx
## [1] "contr.treatment"
fit <- lmFit(data.rma, design)
contr.str <- c()
for(i in 1:(length(lev)-1)){
contr.str <- c(contr.str, paste(lev[i], lev[(i+1):length(lev)], sep = '-'))
}
contr.str
## [1] "IL33-IL22" "IL33-IL13" "IL33-IL4" "IL33-IL17C" "IL33-IL17A"
## [6] "IL33-ctrl" "IL22-IL13" "IL22-IL4" "IL22-IL17C" "IL22-IL17A"
## [11] "IL22-ctrl" "IL13-IL4" "IL13-IL17C" "IL13-IL17A" "IL13-ctrl"
## [16] "IL4-IL17C" "IL4-IL17A" "IL4-ctrl" "IL17C-IL17A" "IL17C-ctrl"
## [21] "IL17A-ctrl"
contr.mat.all <- makeContrasts(contrasts = contr.str, levels = lev_orig)
printCons(contr.mat.all)
## [1] "1: IL33-IL22"
## [1] "2: IL33-IL13"
## [1] "3: IL33-IL4"
## [1] "4: IL33-IL17C"
## [1] "5: IL33-IL17A"
## [1] "6: IL33-ctrl"
## [1] "7: IL22-IL13"
## [1] "8: IL22-IL4"
## [1] "9: IL22-IL17C"
## [1] "10: IL22-IL17A"
## [1] "11: IL22-ctrl"
## [1] "12: IL13-IL4"
## [1] "13: IL13-IL17C"
## [1] "14: IL13-IL17A"
## [1] "15: IL13-ctrl"
## [1] "16: IL4-IL17C"
## [1] "17: IL4-IL17A"
## [1] "18: IL4-ctrl"
## [1] "19: IL17C-IL17A"
## [1] "20: IL17C-ctrl"
## [1] "21: IL17A-ctrl"
contr.mat.all
## Contrasts
## Levels IL33-IL22 IL33-IL13 IL33-IL4 IL33-IL17C IL33-IL17A IL33-ctrl
## ctrl 0 0 0 0 0 -1
## IL13 0 -1 0 0 0 0
## IL17A 0 0 0 0 -1 0
## IL17C 0 0 0 -1 0 0
## IL22 -1 0 0 0 0 0
## IL33 1 1 1 1 1 1
## IL4 0 0 -1 0 0 0
## Contrasts
## Levels IL22-IL13 IL22-IL4 IL22-IL17C IL22-IL17A IL22-ctrl IL13-IL4
## ctrl 0 0 0 0 -1 0
## IL13 -1 0 0 0 0 1
## IL17A 0 0 0 -1 0 0
## IL17C 0 0 -1 0 0 0
## IL22 1 1 1 1 1 0
## IL33 0 0 0 0 0 0
## IL4 0 -1 0 0 0 -1
## Contrasts
## Levels IL13-IL17C IL13-IL17A IL13-ctrl IL4-IL17C IL4-IL17A IL4-ctrl
## ctrl 0 0 -1 0 0 -1
## IL13 1 1 1 0 0 0
## IL17A 0 -1 0 0 -1 0
## IL17C -1 0 0 -1 0 0
## IL22 0 0 0 0 0 0
## IL33 0 0 0 0 0 0
## IL4 0 0 0 1 1 1
## Contrasts
## Levels IL17C-IL17A IL17C-ctrl IL17A-ctrl
## ctrl 0 -1 -1
## IL13 0 0 0
## IL17A -1 0 1
## IL17C 1 1 0
## IL22 0 0 0
## IL33 0 0 0
## IL4 0 0 0
contr.mat <- contr.mat.all[,]
# contr.mat <- contr.mat.all[,c(1,2,10,25,36,37,38,39,40,41,42,43,44,45)]
contr.mat
## Contrasts
## Levels IL33-IL22 IL33-IL13 IL33-IL4 IL33-IL17C IL33-IL17A IL33-ctrl
## ctrl 0 0 0 0 0 -1
## IL13 0 -1 0 0 0 0
## IL17A 0 0 0 0 -1 0
## IL17C 0 0 0 -1 0 0
## IL22 -1 0 0 0 0 0
## IL33 1 1 1 1 1 1
## IL4 0 0 -1 0 0 0
## Contrasts
## Levels IL22-IL13 IL22-IL4 IL22-IL17C IL22-IL17A IL22-ctrl IL13-IL4
## ctrl 0 0 0 0 -1 0
## IL13 -1 0 0 0 0 1
## IL17A 0 0 0 -1 0 0
## IL17C 0 0 -1 0 0 0
## IL22 1 1 1 1 1 0
## IL33 0 0 0 0 0 0
## IL4 0 -1 0 0 0 -1
## Contrasts
## Levels IL13-IL17C IL13-IL17A IL13-ctrl IL4-IL17C IL4-IL17A IL4-ctrl
## ctrl 0 0 -1 0 0 -1
## IL13 1 1 1 0 0 0
## IL17A 0 -1 0 0 -1 0
## IL17C -1 0 0 -1 0 0
## IL22 0 0 0 0 0 0
## IL33 0 0 0 0 0 0
## IL4 0 0 0 1 1 1
## Contrasts
## Levels IL17C-IL17A IL17C-ctrl IL17A-ctrl
## ctrl 0 -1 -1
## IL13 0 0 0
## IL17A -1 0 1
## IL17C 1 1 0
## IL22 0 0 0
## IL33 0 0 0
## IL4 0 0 0
I HAVE DECIDED TO GENERATE ALL THE POSSIBLE CONTRASTS in this case :-). We only have 21 possible contrasts due to the existence of 6 undifferentiated controls, therefore, all 6 CEL files belong to the group control, regardless of the time 6 or 24 h.
# anno.db <- 'pd.hugene.2.1.st'
anno.db <- 'hugene21sttranscriptcluster.db'
require(anno.db, character.only = T)
## Loading required package: hugene21sttranscriptcluster.db
## Loading required package: AnnotationDbi
##
## Attaching package: 'AnnotationDbi'
## The following object is masked from 'package:dplyr':
##
## select
## Loading required package: org.Hs.eg.db
##
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
##
library(openxlsx)
print(paste('Generating', ncol(contr.mat), 'contrasts:'))
## [1] "Generating 21 contrasts:"
for (contrast in 1:ncol(contr.mat)) {
print(paste(contrast, 'of', ncol(contr.mat)))
curr.contrast <- colnames(contr.mat)[contrast]
dir.create(file.path(ORIGINO.PROJECT.PATH, 'toptable_out'), showWarnings = F)
file.out <- paste0(ORIGINO.PROJECT.PATH, '/toptable_out/', curr.contrast, '.xlsx')
fit2 <- contrasts.fit(fit, contr.mat)
fit2 <- eBayes(fit2)
data.topTable <- topTable(fit2, coef = curr.contrast, number = Inf)
colnames(data.topTable)[1] <- paste0(
str_extract(curr.contrast, '^.+?(?=-)'),
'_vs_',
str_extract(curr.contrast, '(?<=-).+')
)
PROBES<- rownames(data.topTable)
probe2gene <- AnnotationDbi::select(hugene21sttranscriptcluster.db, keys=PROBES, columns=c("SYMBOL", "ENTREZID", "GENENAME"))
# data.topTable <- suppressMessages(
# getTopTable_GeneInfo(topTable.in = data.topTable,
# probeIDs.vector = as.character(rownames(data.topTable))))
res <- data.topTable %>%
tibble::rownames_to_column("PROBEID") %>%
left_join(probe2gene, by='PROBEID') %>%
mutate_all(as.character)%>%
write.xlsx(file.out, header=T)
}
## [1] "1 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## Note: zip::zip() is deprecated, please use zip::zipr() instead
## [1] "2 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "3 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "4 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "5 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "6 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "7 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "8 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "9 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "10 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "11 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "12 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "13 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "14 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "15 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "16 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "17 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "18 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "19 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "20 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
## [1] "21 of 21"
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## 'select()' returned 1:many mapping between keys and columns
phenoData(data.rma) <- AnnotatedDataFrame(df.anno)
featureData(data.rma) <- AnnotatedDataFrame(
suppressMessages(
getGeneInfo(
rownames(data.rma))))
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning in result_fetch(res@ptr, n = n): Don't need to call dbFetch() for
## statements, only for queries
## Warning: `data_frame()` is deprecated, use `tibble()`.
## This warning is displayed once per session.
save(data.rma, list='data.rma', file=paste0(ORIGINO.PROJECT.PATH, PROJECT, '_eset.RData'))
probe.vector <- rownames(data.exp)
data.exp %>%
rbind(tissue = df.anno$Rx) %>%
rbind(study = PROJECT) %>%
t() %>%
as_tibble() %>%
gather(key = probe, value = value, -study, -tissue) -> data.exp.db
write.xlsx(as.data.frame(exprs(data.rma)), paste0(ORIGINO.PROJECT.PATH, '_exp.xlsx'))
write.xlsx(data.exp.db, paste0(ORIGINO.PROJECT.PATH, PROJECT, '_exp_db.xlsx'))