biosimulators_utils.ref package#

Submodules#

biosimulators_utils.ref.data_model module#

Data model for references (e.g., journal articles, books)

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-09-05

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

class biosimulators_utils.ref.data_model.JournalArticle(pubmed_id: str | None = None, pubmed_central_id: str | None = None, doi: str | None = None, authors: ~typing.List[str] = <factory>, title: str | None = None, journal: str | None = None, volume: str | None = None, issue: str | None = None, pages: str | None = None, year: int | None = None, date: str | None = None)[source]#

Bases: Reference

Journal article

pubmed_id[source]#

PubMed id

Type:

str

pubmed_central_id[source]#

PubMed Central id

Type:

str

doi[source]#

DOI

Type:

str

authors[source]#

authors

Type:

list of str

title[source]#

title

Type:

str

journal[source]#

journal

Type:

str

volume[source]#

volume

Type:

str

issue[source]#

issue

Type:

str

pages[source]#

pages

Type:

str

year[source]#

year

Type:

str

date[source]#

publication date

Type:

str

authors: List[str][source]#
date: str = None[source]#
doi: str = None[source]#
get_citation()[source]#

Format a citation for a reference (e.g., “Authors. Title. Journal volume, issue: pages (year)”.).

Returns:

formatted citation for a reference

Return type:

str

get_uri()[source]#

Get a standard URI for the citation (e.g. http://identifiers.org/doi/10.1007/BF00713556).

Returns:

formatted URI

Return type:

str

issue: str = None[source]#
journal: str = None[source]#
pages: str = None[source]#
pubmed_central_id: str = None[source]#
pubmed_id: str = None[source]#
title: str = None[source]#
volume: str = None[source]#
year: int = None[source]#
class biosimulators_utils.ref.data_model.PubMedCentralOpenAccesGraphic(id: str | None = None, label: str | None = None, caption: str | None = None, filename: str | None = None)[source]#

Bases: object

A PubMed Central open access graphic

id[source]#

PubMed Central id

Type:

str

label[source]#

label (e.g., Figure 1)

Type:

str

caption[source]#

caption

Type:

str

filename[source]#

local path to JPEG file for graphic

Type:

str

caption: str = None[source]#
filename: str = None[source]#
id: str = None[source]#
label: str = None[source]#
class biosimulators_utils.ref.data_model.Reference[source]#

Bases: ABC

abstract get_citation()[source]#

Get a human-readable citation for a reference

Returns:

human-readable citation

Return type:

str

biosimulators_utils.ref.utils module#

Methods for working with references (e.g., journal articles, books)

Author:

Jonathan Karr <karr@mssm.edu>

Date:

2021-09-05

Copyright:

2021, Center for Reproducible Biomedical Modeling

License:

MIT

biosimulators_utils.ref.utils.get_pubmed_central_open_access_graphics(id, dirname, session=<module 'requests' from '/home/runner/work/Biosimulators_utils/Biosimulators_utils/.venv/lib/python3.10/site-packages/requests/__init__.py'>)[source]#

Get the open access graphics for a publication in PubMed Central

Parameters:
  • id (str) – PubMed Central id

  • dirname (str) – path to save images

  • session (requests.session.Session) – requests session

Returns:

list of graphics

Return type:

list of PubMedCentralOpenAccesGraphic

biosimulators_utils.ref.utils.get_reference(pubmed_id=None, doi=None, cross_ref_session=<module 'requests' from '/home/runner/work/Biosimulators_utils/Biosimulators_utils/.venv/lib/python3.10/site-packages/requests/__init__.py'>)[source]#

Get data about a reference by its PubMed id and/or DOI

Parameters:
  • pubmed_id (str, optional) – PubMed id

  • doi (str, optional) – DOI

  • session (requests.sessions.Session, optional) – requests session

Returns:

data about a reference

Return type:

JournalArticle