diff --git a/metaquantome/cli.py b/metaquantome/cli.py index ede63a0..a50712f 100755 --- a/metaquantome/cli.py +++ b/metaquantome/cli.py @@ -43,6 +43,7 @@ def cli(): img=args.img, infile=args.infile, mode=args.mode, + ontology=args.ontology, meancol=args.meancol, nterms=args.nterms, strip=args.strip, diff --git a/metaquantome/modules/run_viz.py b/metaquantome/modules/run_viz.py index f139a5b..2c4913b 100644 --- a/metaquantome/modules/run_viz.py +++ b/metaquantome/modules/run_viz.py @@ -8,7 +8,7 @@ def run_viz(plottype, img, infile, strip=None, mode=None, meancol=None, nterms='5', target_rank=None, barcol=6, # barplot - textannot=None, fc_name=None, flip_fc=False, gosplit=False, # volcano + textannot=None, fc_name=None, flip_fc=False, gosplit=False, ontology=None, # volcano sinfo=None, filter_to_sig=False, alpha='0.05', # heatmap calculate_sep=False, # pca whichway=None, name=None, id=None, target_onto=None, # ft_dist @@ -24,7 +24,7 @@ def run_viz(plottype, img, infile, strip=None, if plottype == "bar": cmd += [mode, meancol, nterms, width, height, target_rank, target_onto, barcol, tabfile] elif plottype == "volcano": - cmd += [str(textannot), fc_name, flip_fc, gosplit, width, height, tabfile] + cmd += [str(textannot), fc_name, flip_fc, ontology, gosplit, width, height, tabfile] elif plottype == "heatmap": samp_grps = SampleGroups(sinfo) all_intcols_str = ','.join(samp_grps.all_intcols) diff --git a/metaquantome/modules/viz.R b/metaquantome/modules/viz.R index 5596dcf..1cb93b8 100644 --- a/metaquantome/modules/viz.R +++ b/metaquantome/modules/viz.R @@ -479,19 +479,21 @@ volcano_cli <- function(args){ # 4. name of text annotation column # 5. name of fold change column # 6. whether to flip fc - # 7. whether to split GO by ontology/namespace - # 8. image width (default 5) - # 9. image height (default 5) + # 7. ontology + # 8. whether to split GO by ontology/namespace + # 9. image width (default 5) + # 10. image height (default 5) img <- args[2] infile <- args[3] df <- read_result(infile) textannot <- args[4] fc_name <- args[5] flip_fc <- (args[6] == "True") - gosplit <- (args[7] == "True") - width <- as.numeric(args[8]) - height <- as.numeric(args[9]) - tabfile <- args[10] + ontology <- args[7] + gosplit <- (args[8] == "True" & ontology == "go") + width <- as.numeric(args[9]) + height <- as.numeric(args[10]) + tabfile <- args[11] if (tabfile == "None") tabfile <- NULL plt <- mq_volcano(df, img=img, textannot=textannot, fc_name=fc_name, flip_fc=flip_fc, gosplit=gosplit, width=width, height=height,