hello Amanda,

That is a script of a function ,( sorry but not comment in this function) . Maybe you find something interesting. let me know 

produce.differential.analysis <- function(RGobj,   ANNOTATION){

    print(paste("Starting the  UNIVARIATE differential analysis for Agilent platform"))
    design =  read.csv2("DATA/design.txt", sep="\t", header = TRUE)
       
      for (d in 2:ncol(design)){
        #gestion Folder
        name_folder = colnames(design)[d]#nom de l'analyse differentielle
       
        print("Process for the design ")
        print(name_folder)
        
        print("filtering of data")
        
        condition1 =as.vector(na.omit((design[design[d] == 0,1])))
        condition2 =as.vector(na.omit((design[design[d] == 1,1])))
        
        label_condition1 =unique(condition1)
        label_condition2 =unique(condition2)
        
        
        current.sumFlag.label_condition1 =  apply(RGobj$Rb[,RGobj$target$Condition == label_condition1], 1, sum)
        current.sumFlag.label_condition2 =  apply(RGobj$Rb[,RGobj$target$Condition == label_condition2], 1, sum)
       
       #retain only the probes  with flag significatif in more 50 pc of samples 
       mask_row =   current.sumFlag.label_condition1  > length(as.vector(na.omit((design[design[d] == 0,1])))) /2 & current.sumFlag.label_condition2  > length(as.vector(na.omit((design[design[d] == 0,2])))) /2
       mask_col =   c(grep(label_condition1,RGobj$targets$Condition), grep(label_condition2,RGobj$targets$Condition))
        
      
      #summarization
      E <- new("MAList", list(targets=RGobj$targets[mask_col,], genes=RGobj$genes[mask_row,], source=RGobj$source, M=RGobj$Gb[mask_row,mask_col], A=RGobj$G[mask_row,mask_col]))
      E.avg <- avereps(E, ID=E$genes$ProbeName)
             
                                                    
       #creation folder analysis  
       if (!file.exists(paste("RESULT/",name_folder, sep = ""))){ dir.create(paste("RESULT/",name_folder, sep = ""), showWarnings = TRUE, recursive = FALSE, mode = "0777")}
                  
           
         write.table(E$target, paste("RESULT/",name_folder,"/mappage_Condition_NomFichier.csv", sep = "") , quote = TRUE, sep = ";",  eol = "\n", na = "NA", dec = ".", row.names = FALSE, col.names = TRUE)
         
         
                 
         design_limma= cbind(est_condition1 =rep(1, length(condition1) + length(condition2)) ,
                             est_condition2 =c(rep(0, length(condition1)), rep(1, length(condition2))) )
               
         fit = lmFit(E.avg$A, design_limma)
         fit2= eBayes(fit)
        
         rs_table = topTable(fit2, coef= 2, adjust= "BH", number =nrow(fit2$genes))
         matrice = cbind(ID = rownames(E.avg), E.avg$A)
         rs_table_exp = merge(rs_table, matrice, by.x = "ID", by.y = "ID")
         
         
         rs_table_exp_annotated = merge(rs_table_exp, ANNOTATION,  by.x = "ID", by.y = "ProbeID")
           
         write.table(rs_table_exp_annotated, paste("RESULT/",name_folder,"/rs_differential_analysis.csv", sep = "") , quote = TRUE, sep = ";",  eol = "\n", na = "NA", dec = ".", row.names = FALSE, col.names = TRUE)
        
         MAAndVolcanoPlot(rs_table_exp_annotated, paste("RESULT/",name_folder, sep = "") )      
               
    }
} 





Le Jeudi 7 novembre 2013 18h58, "amandafassis@usp.br" <amandafassis@usp.br> a écrit :
 
Dear mail list members, 


I'm working with Agilent single color arrays (4 x 44K) wich data were extracted by Feature Extraction software; this software provides some flags measurements in the file. 


In limma manual the authors showed an example with Agilent single color arrays: Time Course E ects of Corn Oil on Rat Thymus with Agilent 4x44K Arrays - but in this they filtered out control probes and low expressed probes. 


I couldn't find in the manual if limma takes the flag measurement parameters to process data. If not, does anyone have an example of a function do to that? 



Best regards, 


Amanda Freire de Assis, MSc 
Molecular Immunogenetics Group 
University of São Paulo 
Av. Bandeirantes, 3900 
14049-900 - Ribeirão Preto - Brazil 
+55 16 36023246 


    [[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
Bioconductor@r-project.org
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
	[[alternative HTML version deleted]]

