fetchSignal               package:SAGx               R Documentation

_F_e_t_c_h _d_a_t_a _f_r_o_m _t_h_e _G_A_T_C _d_a_t_a_b_a_s_e

_D_e_s_c_r_i_p_t_i_o_n:

     Fetch FILENAME, PROBESET, SIGNAL and ABS_CALL from the GATC
     database

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

experiment: The name of the experiment corresponding to an individual
          chip

 channel: The channel to the database

    chip: the chip type

_V_a_l_u_e:

     dataframe with columns

_A_u_t_h_o_r(_s):

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

_E_x_a_m_p_l_e_s:

     ## 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)

