comparison peca.R @ 5:5a39fa8a235a draft

planemo upload for repository https://github.com/caleb-easterly/galaxytools/peca
author caleb-easterly
date Thu, 22 Feb 2018 11:45:43 -0500
parents 784c107c5861
children e16cd77cf9f7
comparison
equal deleted inserted replaced
4:07bd2582526b 5:5a39fa8a235a
18 18
19 # read 2nd and 3rd argument, which are path to files with group 1 and 2 column indices 19 # read 2nd and 3rd argument, which are path to files with group 1 and 2 column indices
20 group1_ind_file <- as.vector(as.matrix(read.csv(args[2], header = FALSE)[1, ])) 20 group1_ind_file <- as.vector(as.matrix(read.csv(args[2], header = FALSE)[1, ]))
21 group2_ind_file <- as.vector(as.matrix(read.csv(args[3], header = FALSE)[1, ])) 21 group2_ind_file <- as.vector(as.matrix(read.csv(args[3], header = FALSE)[1, ]))
22 22
23 # test type
24 ttype <- args[4]
25
23 # read 4th argument, which is output file name 26 # read 4th argument, which is output file name
24 out_file <- args[4] 27 out_file <- args[5]
25 28
26 # get vectors of column names 29 # get vectors of column names
27 df_names <- colnames(quant_file) 30 df_names <- colnames(quant_file)
28 group1_names <- df_names[group1_ind_file] 31 group1_names <- df_names[group1_ind_file]
29 group2_names <- df_names[group2_ind_file] 32 group2_names <- df_names[group2_ind_file]
30 33
31 # run PECA_df 34 # run PECA_df
32 # id column is first column (hard-coded) 35 # id column is first column (hard-coded)
33 results <- PECA_df(quant_file, group1_names, group2_names, id = df_names[1]) 36 results <- PECA_df(quant_file,
37 group1_names,
38 group2_names,
39 type=ttype,
40 id = df_names[1])
34 41
35 # put add protein names column 42 # put add protein names column
36 results$prot <- row.names(results) 43 results$prot <- row.names(results)
37 results <- results[, c("prot", "slr", "t", "score", "n", "p", "p.fdr")] 44 results <- results[, c("prot", "slr", "t", "score", "n", "p", "p.fdr")]
38 45