Commit e2eb6a88 authored by iquasere's avatar iquasere
Browse files

proteomics postprocessing interface done

parent 5ee03182
......@@ -12,21 +12,23 @@ for (package in packages){
option_list = list(
make_option(c("-qm", "--quantification-matrix"), type="character", default=NULL,
help="The quantification matrix (TSV format)", metavar="character"),
make_option(c("-c", "--conditions"), type="list", metavar="character",
help="The conditions to define duplicates (e.g. 'c1,c1,c2,c2')",
default=NULL),
make_option(c("-m", "--method"), default="differential", type="character",
help="Method for ordering rows in protein expression heatmap
[differential/abundance]", metavar="character",),
make_option(c("-k", "--cluster-size"), type="list", metavar="character",
help="Number of proteins to use for regression", default=10),
make_option(c("-o", "--output"), type="character", default=NULL,
help="Output directory", metavar="character"));
help="Output file", metavar="character"));
opt_parser = OptionParser(option_list=option_list)
opt = parse_args(opt_parser)
pdata = as.matrix(read.table(opt$quantification_matrix, sep='\t', h=T, row.names=1))
pdata[pdata==0] = NA
pset = ExpressionSet(pdata)
norm = justvsn(pset)
imputed = llsImpute(pset)
# variance stabilization normalization
norm = justvsn(ExpressionSet(pdata))
# local least squares imputation
imputed = llsImpute(t(exprs(norm)))
new_data = t(completeObs(imputed))
# export results
write.table(new_data, file = opt$output, sep='\t', row.names = TRUE, col.names = TRUE)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment