comparison AskoR_DE.R @ 0:ceef9bc6bbc7 draft

planemo upload for repository https://github.com/genouest/galaxy-tools/tree/master/tools/askor commit 08a187f91ba050d584e586d2fcc99d984dac607c
author genouest
date Thu, 12 Apr 2018 05:23:45 -0400
parents
children 877d2be25a6a
comparison
equal deleted inserted replaced
-1:000000000000 0:ceef9bc6bbc7
1 askor_path<-Sys.getenv("ASKOR_PATH")
2 source(paste0(askor_path,"/AskoR.R"))
3
4 ##############################################
5 ## Parameters ##
6 ##############################################
7
8 parameters<-Asko_start()
9 setwd(parameters$dir_path)
10 # source("/home/flegeai/local/askoR/askoStart.R")
11 #parameters$col_genes=1
12 #parameters$col_counts=7
13 # parameters$regex=FALSE
14 #parameters$rm_sample=list("T0_4", "T1K_4", "T1A_4", "T2A_4", "T2K_4", "T3K_4", "T3A_4")
15 # #parameters$select_sample=c("T0_4", "T1K_4", "T1A_4", "T2A_4", "T2K_4", "T3K_4", "T3A_4")
16 # #parameters$rm_sample=list("_4")
17 # parameters$organism = "Ap"
18 # parameters$fileofcount = NULL
19 # parameters$annotation_file = "annotation.txt"
20 # parameters$sample_file = "Samples.txt"
21 # parameters$contrast_file = "Contrasts.txt"
22 # parameters$mk_context="manual"
23 # parameters$glm="qlf"
24
25
26 ########################################
27 ## Loading the data from the samples ##+
28 ########################################
29
30 data<-loadData(parameters)
31 cat("Total number of genes : ", dim(data$dge$counts)[1], "\n")
32 cat("Total number of samples : ", dim(data$dge$counts)[2], "\n")
33 cat("summary of CPM by samples\n")
34 summary(cpm(data$dge))
35 pdf(parameters$output_pdf)
36 asko_data<-asko3c(data)
37 cat("Filtering genes with more than ", parameters$threshold_cpm, " CPM in ",parameters$replicate_cpm,"samples\n")
38 asko_filt<-GEfilt(data$dge, parameters)
39 cat("Total number of filtered genes : ", dim(asko_filt$counts)[1], "\n")
40 asko_norm<-GEnorm(asko_filt,parameters)
41 GEcorr(asko_norm,parameters)
42 cat("Statistical analysis\n")
43 DEanalysis(asko_norm,data, asko_data,parameters)
44 dev.off()