# HG changeset patch # User caleb-easterly # Date 1520551664 18000 # Node ID 19bb06146c2e5337f7018b61e72309d81d7d2996 # Parent f0de83932f9e08d07172b38060d6aed093b2dd1c planemo upload for repository https://github.com/caleb-easterly/galaxytools/peca diff -r f0de83932f9e -r 19bb06146c2e peca.R --- a/peca.R Mon Mar 05 18:11:34 2018 -0500 +++ b/peca.R Thu Mar 08 18:27:44 2018 -0500 @@ -14,7 +14,8 @@ # read first argument, which is quant file (proteins in rows, samples in columns) quant_file <- read.delim(args[1], na.strings = c("0", "NA"), - sep = '\t') + sep = '\t', + stringsAsFactors=FALSE) # read 2nd and 3rd argument, which are path to files with group 1 and 2 column indices group1_ind_file <- as.vector(as.matrix(read.csv(args[2], header = FALSE)[1, ])) @@ -22,20 +23,25 @@ # test type ttype <- args[4] - - # read 4th argument, which is output file name - out_file <- args[5] + + # paired or not + pair <- args[5] == "true" + + # output file name + out_file <- args[6] # get vectors of column names df_names <- colnames(quant_file) group1_names <- df_names[group1_ind_file] group2_names <- df_names[group2_ind_file] - + # run PECA_df # id column is first column (hard-coded) - results <- PECA_df(quant_file, - group1_names, - group2_names, + results <- PECA_df(df = quant_file, + samplenames1 = group1_names, + samplenames2 = group2_names, + test = ttype, + paired = pair, id = df_names[1]) # put add protein names column diff -r f0de83932f9e -r 19bb06146c2e peca.xml --- a/peca.xml Mon Mar 05 18:11:34 2018 -0500 +++ b/peca.xml Thu Mar 08 18:27:44 2018 -0500 @@ -9,17 +9,18 @@ ## write groups to file echo '$group1' > group1.txt && echo '$group2' > group2.txt && - Rscript --vanilla '$__tool_directory__/peca.R' '$input' group1.txt group2.txt '$test_type' '$output' + Rscript --vanilla '$__tool_directory__/peca.R' '$input' group1.txt group2.txt '$test_type' '$paired' '$output' ]]> - + + @@ -30,6 +31,7 @@ +