Citations#

QIIME 2 can automatically track citations as a user performs an analysis. This is done via CitationRecord and lists of them (list and Citations).

class qiime2.plugin.Citations[source]#

A simple subclass of collections.OrderedDict but iterates over values instead of keys by default.

classmethod load(path, package=None)[source]#

Load a bibtex file from a path (or relative package path)

Parameters:
  • path (str | PathLike) – The path of a bibtex file, if package is provided, it will be relative to the python package.

  • package (str | None) – The python package to load from.

Return type:

Citations

__iter__()[source]#

Iterates over the contained CitationRecord’s

save(f)[source]#

Save object as bibtex to a filepath or filehandle

Parameters:

f (str | IO) – A string (but not os.PathLike) or filehandle

Return type:

None

class qiime2.plugin.CitationRecord(type, fields)[source]#

A collections.namedtuple() of bibtex entry type and entry fields.

Parameters:
  • type (str) – The bibtex entry type (e.g. β€˜article’)

  • fields (dict) – The individual key-value pairs of the bibtex entry