Corncob error: returned non-zero exit status 1.

Hi everyone,

I try to use corncob plugin, here are my command and the error I have faced, any one can help on that?

qiime corncob differentialtest --i-table deblur-feature-frq-con-filtered-table.qzv.qza --m-metadata-file metadatawom.tsv --p-variable diagnosis --i-taxonomy deblur.taxonomy.qza --o-output corncobresults --verbose
Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: differentialtest.R /var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/table.tsv /var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/metadata.tsv /var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/qiime2-archive-cn7_ddqm/0b117b76-0f48-4e05-a40c-cbc57d85fd77/data/taxonomy.tsv diagnosis /var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/data.tsv

R version 3.5.1 (2018-07-02)
Great! phyloseq is already available

Error: package or namespace load failed for ‘phyloseq’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘ggplot2’
Execution halted
Traceback (most recent call last):
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/”, line 328, in call
results = action(**arguments)
File “</Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/>”, line 2, in differentialtest
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 245, in bound_callable
output_types, provenance)
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_corncob/”, line 56, in differentialtest
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_corncob/”, line 36, in run_commands, check=True)
File “/Users/maysa/miniconda3/envs/qiime2-2020.2/lib/python3.6/”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘differentialtest.R’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/table.tsv’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/metadata.tsv’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/qiime2-archive-cn7_ddqm/0b117b76-0f48-4e05-a40c-cbc57d85fd77/data/taxonomy.tsv’, ‘diagnosis’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/data.tsv’]’ returned non-zero exit status 1.

Plugin error from corncob:

Command ‘[‘differentialtest.R’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/table.tsv’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/metadata.tsv’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/qiime2-archive-cn7_ddqm/0b117b76-0f48-4e05-a40c-cbc57d85fd77/data/taxonomy.tsv’, ‘diagnosis’, ‘/var/folders/jg/y51ysrzd68j2w7jxgnd503hr0000gp/T/tmplpfu5rxg/data.tsv’]’ returned non-zero exit status 1.

See above for debug info.

Any help would be valuable!

Hi @maysa1,
I’m not too familiar with the corncob plugin itself, I’ve only ever used it stand-alone in R, however, the non-zero exit status often creeps up when there’s zeros or NAs in the dataset when it is not expected.
But let’s see if the plugin developer have any suggestions. @Pauline_Trinh

Hi @Mehrbod_Estaki,

Thank you for your reply, until that time I will try to remove the NAs from the metadata file and see if that works.


Hi @maysa1! Sorry for the delayed reply. corncob’s R package has actually gone through a lot of revamping of the functions before it was accepted for publication this year. I haven’t gotten around to updating the plug-in to reflect the changes to the corncob R package so at the moment I would suggest using corncob in R to access the correct functions!

Bryan Martin (corncob’s creator) keeps a really well documented GitHub page for corncob’s use in R and responds to issues very quickly.

Sorry about the delay!



Thanks for the update, I will try corncob package for now.