biosimulators_utils.ref package — BioSimulators utils 0.1.154 documentation

# 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: Optional[str] = None, pubmed_central_id: Optional[str] = None, doi: Optional[str] = None, authors: List[str] = <factory>, title: Optional[str] = None, journal: Optional[str] = None, volume: Optional[str] = None, issue: Optional[str] = None, pages: Optional[str] = None, year: Optional[int] = None, date: Optional[str] = None)

  Bases: `biosimulators_utils.ref.data_model.Reference`

  Journal article

  pubmed_id

    PubMed id

    Type

      `str`

  pubmed_central_id

    PubMed Central id

    Type

      `str`

  doi

    DOI

    Type

      `str`

  authors

    authors

    Type

      `list` of `str`

  title

    title

    Type

      `str`

  journal

    journal

    Type

      `str`

  volume

    volume

    Type

      `str`

  issue

    issue

    Type

      `str`

  pages

    pages

    Type

      `str`

  year

    year

    Type

      `str`

  date

    publication date

    Type

      `str`

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

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

    Returns

      formatted citation for a reference

    Return type

      `str`

  issue: str = None
  journal: str = None
  pages: str = None
  pubmed_central_id: str = None
  pubmed_id: str = None
  title: str = None
  volume: str = None
  year: int = None

class biosimulators_utils.ref.data_model.PubMedCentralOpenAccesGraphic(id: Optional[str] = None, label: Optional[str] = None, caption: Optional[str] = None, filename: Optional[str] = None)

  Bases: `object`

  A PubMed Central open access graphic

  id

    PubMed Central id

    Type

      `str`

  label

    label (e.g., `Figure 1`)

    Type

      `str`

  caption

    caption

    Type

      `str`

  filename

    local path to JPEG file for graphic

    Type

      `str`

  caption: str = None
  filename: str = None
  id: str = None
  label: str = None

class biosimulators_utils.ref.data_model.Reference

  Bases: `abc.ABC`

  abstract get_citation()

    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 '/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/requests/__init__.py'>)

  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 '/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/requests/__init__.py'>)

  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`