Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions metaquantome/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions metaquantome/modules/run_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
16 changes: 9 additions & 7 deletions metaquantome/modules/viz.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down