fetchSignal: Fetch data from the GATC database

Description Usage Arguments Value Author(s) Examples

Description

Fetch FILENAME, PROBESET, SIGNAL and ABS\_CALL from the GATC database

Usage

1
fetchSignal(experiment="AZ33 ALI", channel, chip="HG_U95Av2")

Arguments

experiment

The name of the experiment corresponding to an individual chip

channel

The channel to the database

chip

the chip type

Value

dataframe with columns

Author(s)

Ported to R by Per Broberg. Original Oracle code by Petter Hallgren, with input from Petra Johansson.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
# Do not run example 1. Fetch Probeset, Signal, ABS_CALL and CHIP for one sample.
library(RODBC)
(channel<-odbcConnect("DSN",uid="USERID",pwd="PASSWORD"))
ali.data <-fetchSignal(experiment="AZ33 ALI", channel, chip="hg_u95a")
 colnames(ali.data)
#[1] "FILENAME" "PROBESET" "SIGNAL" "ABS_CALL" "CHIP"

# Do not run example 2
t1 <- paste("select q1.name as name from experiment q1, physical_chip q2, chip_design q3")
t2 <- paste("where q1.physical_chip_id=q2.id and q3.id=q2.design_id and ")
t3 <- paste("upper(q1.name) like '
Ids <- sqlQuery(channel,paste(t1,t2,t3) )   
# fetch Signal from GATC corresponding to the U95A chip for all samples in experiment. #
tmp <- apply(Ids,1,toupper)
probes <- data.frame(fetchSignal(experiment=tmp[1],channel, chip="hg_u95a")[,"PROBESET"])
test <- matrix(nrow=nrow(as.data.frame(probes)),ncol=nrow(Ids))
for(i in 1:nrow(as.data.frame(tmp))){
   test[,i] <- fetchSignal(experiment=tmp[i],channel, chip="hg_u95a")[,"SIGNAL"]
}
codes <- data.frame(apply(Ids,1,code<-function(x) substr(x,1,5)))
colnames(test) <- as.character(t(codes))
test <- test[,order(colnames(test))]

## End(Not run)

SAGx documentation built on Nov. 8, 2020, 8:18 p.m.