Consider this example (using an older version of Qiime2 as I was testing something):
$ qiime dada2 --citations
% use `qiime tools citations` on a QIIME 2 result for complete list
@article{key0,
author = {Callahan, Benjamin J and McMurdie, Paul J and Rosen, Michael J and Han, Andrew W and Johnson, Amy Jo A and Holmes, Susan P},
doi = {10.1038/nmeth.3869},
journal = {Nature methods},
number = {7},
pages = {581},
publisher = {Nature Publishing Group},
title = {DADA2: high-resolution sample inference from Illumina amplicon data},
volume = {13},
year = {2016}
}
However, this surprised me:
$ qiime dada2 denoise-paired --citations
No citations found.
Looking at q2-dada2/q2_dada2/plugin_setup.py at dev · qiime2/q2-dada2 · GitHub the plugin does define citations:
plugin = qiime2.plugin.Plugin(
name='dada2',
...
citations=qiime2.plugin.Citations.load('citations.bib', package='q2_dada2')
)
However, none of its actions registered via plugin.methods.register_function
explicitly do so. I would have expected the default here to be inherit the plugin level citations, rather than default to no citations.
Currently qiime2/qiime2/plugin/plugin.py at dev · qiime2/qiime2 · GitHub does explicitly set the default to no citations:
if citations is None:
citations = ()
else:
citations = tuple(citations)
I think this would change the default behaviour (argument left as citations=None
) to work as I expected:
if citations is None:
citations = self.citations
else:
citations = tuple(citations)
Would this change be welcome? I'm happy to submit a pull request.