Mercurial > repos > iuc > iwtomics_testandplot
annotate testandplot.R @ 0:800c7e974e3b draft
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
author | iuc |
---|---|
date | Fri, 04 Aug 2017 17:51:00 -0400 |
parents | |
children |
rev | line source |
---|---|
0
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
1 if (require("IWTomics",character.only = TRUE,quietly = FALSE)) { |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
2 args=commandArgs(TRUE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
3 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
4 # get args names and values |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
5 args_values=strsplit(args,'=') |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
6 args_names=unlist(lapply(args_values,function(arg) arg[1])) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
7 names(args_values)=args_names |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
8 args_values=lapply(args_values,function(arg) arg[2]) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
9 # read filenames |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
10 adjustedpvaluematrix=args_values$adjustedpvaluematrix |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
11 iwtomicsrespdf=args_values$iwtomicsrespdf |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
12 iwtomicssumpdf=args_values$iwtomicssumpdf |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
13 regionids=args_values$regionids |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
14 featureids=args_values$featureids |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
15 rdatafile=args_values$rdatafile |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
16 iwtomicsrdata=args_values$iwtomicsrdata |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
17 iwtomicstests=args_values$iwtomicstests |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
18 iwtomicsselectedfeatures=args_values$iwtomicsselectedfeatures |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
19 # read parameters (from region1 on) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
20 i_region1=which(args_names=='region1') |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
21 for(i in i_region1:length(args)){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
22 eval(parse(text=args[[i]])) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
23 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
24 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
25 # load RData |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
26 load(rdatafile) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
27 # read regionids and featureids |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
28 regionids=as.character(read.delim(regionids,header=FALSE,sep='\t',stringsAsFactors=FALSE)) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
29 featureids=as.character(read.delim(featureids,header=FALSE,sep='\t',stringsAsFactors=FALSE)) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
30 # retrieve region1, region2 and features_subset ids and check they are in the RData |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
31 id_region1=regionids[region1] |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
32 id_region2=regionids[region2] |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
33 id_features_subset=featureids[features_subset] |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
34 if(length(setdiff(c(id_region1,id_region2),idRegions(regionsFeatures)))!=0){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
35 write("Wrong region ids.", stderr()) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
36 quit(save="no", status=10) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
37 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
38 if(length(setdiff(id_features_subset,idFeatures(regionsFeatures)))!=0){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
39 write("Wrong feature ids.", stderr()) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
40 quit(save="no", status=20) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
41 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
42 if(sum(duplicated(paste0(id_region1,id_region2)))){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
43 write("Same test repeated multiple times.", stderr()) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
44 quit(save="no", status=30) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
45 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
46 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
47 # perform test |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
48 tryCatch({ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
49 # fix repeated probs |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
50 if(statistics=='quantile'){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
51 # fix repeated probs |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
52 testprobs=sort(unique(testprobs)) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
53 }else{ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
54 testprobs=0.5 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
55 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
56 regionsFeatures_test=IWTomicsTest(regionsFeatures,id_region1,id_region2,id_features_subset, |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
57 statistics=statistics,probs=testprobs,B=B) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
58 # create adjustedvaluematrix output |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
59 for(test in seq_along(id_region1)){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
60 for(id_feature in id_features_subset){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
61 write(paste0('Test: ',id_region1[test],' vs ',id_region2[test],', on feature ',id_feature), |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
62 file=adjustedpvaluematrix,append=TRUE,sep='\t') |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
63 pval=regionsFeatures_test@test$result[[test]][[id_feature]]$adjusted_pval_matrix |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
64 row.names(pval)=paste('Scale',rev(seq_len(nrow(pval)))) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
65 write.table(pval,file=adjustedpvaluematrix,append=TRUE,sep='\t',quote=FALSE,row.names=TRUE,col.names=FALSE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
66 write('',file=adjustedpvaluematrix,append=TRUE,sep='\t') |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
67 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
68 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
69 }, error = function(err) { |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
70 write("Testing error.", stderr()) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
71 quit(save="no", status=40) #error testing |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
72 }) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
73 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
74 # plot test results |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
75 pdf(iwtomicsrespdf,width=5,height=7) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
76 if(plottype=='boxplot'){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
77 # fix repeated probs |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
78 probs=sort(unique(probs)) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
79 }else{ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
80 probs=c(0.25,0.5,0.75) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
81 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
82 plotTest(regionsFeatures_test,alpha=testalpha,type=plottype,probs=probs,average=average,size=size,ask=FALSE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
83 dev.off() |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
84 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
85 # plot summary results |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
86 if(groupby!='none'){ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
87 pdf(iwtomicssumpdf,width=15,height=10) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
88 plotSummary(regionsFeatures_test,alpha=summaryalpha,only_significant=only_significant,groupby=groupby,ask=FALSE,append=TRUE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
89 dev.off() |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
90 } |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
91 |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
92 # create output |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
93 write.table(as.data.frame(t(paste(id_region1,'vs',id_region2))),file=iwtomicstests,quote=FALSE,sep='\t',row.names=FALSE,col.names=FALSE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
94 write.table(as.data.frame(t(idFeatures(regionsFeatures_test))),file=iwtomicsselectedfeatures,quote=FALSE,sep='\t',row.names=FALSE,col.names=FALSE) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
95 save(regionsFeatures_test,file=iwtomicsrdata) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
96 }else{ |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
97 write("Missing IWTomics package. Please be sure to have it installed before using this tool.", stderr()) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
98 quit(save="no", status=255) |
800c7e974e3b
planemo upload for repository https://github.com/fabio-cumbo/IWTomics4Galaxy commit 90c984bb9f803e1531fe4cb670e876809d48d205
iuc
parents:
diff
changeset
|
99 } |