Skip to content

Commit

Permalink
Remove extraneous whitespace from output table
Browse files Browse the repository at this point in the history
  • Loading branch information
ilveroluca committed Jun 26, 2018
1 parent b484db6 commit 93c3c3c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions integrals.R
Expand Up @@ -150,16 +150,16 @@ integrate_all <- function(spectrum_objects, aligned_offsets, metabolites_table)

print_report <- function(integration, metabolites_table) {
for (h in 1:nrow(metabolites_table) ) {
ss = paste(metabolites_table[h,1], "\tok")
pp = paste(metabolites_table[h,1], "\tbad")
ss = paste(metabolites_table[h,1], "ok", sep="\t")
pp = paste(metabolites_table[h,1], "bad", sep="\t")

reference = integration[1,h]
test = integration[2,h]

tt = test * 100 / reference
ttt = abs(100 - tt)
output <- ifelse(ttt < 20, ss, pp)
cat(output, "\tdiff\t", round(ttt,2), "\t%\n")
cat(output, "\tdiff\t", round(ttt,2), "\t%\n", sep="")
}
}

Expand Down Expand Up @@ -199,7 +199,8 @@ do_arg_parsing <- function() {
)
epilogue_help <- paste("\tMETABOLITES_TABLE\n\t\tMetabolites table in tab-separated format\n\n",
"\tREFERENCE_SPECTRUM\n\t\tReference dataset (Bruker NMR)\n\n",
"\tTEST_SPECTRUM\n\t\tTest dataset (Bruker NMR)\n\n"
"\tTEST_SPECTRUM\n\t\tTest dataset (Bruker NMR)\n\n",
sep=""
)

parser <- OptionParser(
Expand Down

0 comments on commit 93c3c3c

Please sign in to comment.