# This file is part of bioservices software
#
# Copyright (c) 2013-2014 - EBI-EMBL
# Copyright (c) 2021 - Institut Pasteur
#
# File author(s):
# Thomas Cokelaer <cokelaer@ebi.ac.uk>
#
# Distributed under the GPLv3 License.
# See accompanying file LICENSE.txt or copy at
# http://www.gnu.org/licenses/gpl-3.0.html
#
# website: https://github.com/cokelaer/bioservices
# documentation: http://packages.python.org/bioservices
#
##############################################################################
"""Interface to biocontainer
.. topic:: What is biocontainers
:URL: https://biocontainers.pro/
:Citation:
.. highlights::
BioContainers is an open-source project that aims to create,
store, and distribute bioinformatics software containers and
packages.
-- From biocontainers (about), Jan 2021
"""
import pandas as pd
from bioservices.services import REST
from bioservices import logger
logger.name = __name__
__all__ = ["Biocontainers"]
[docs]class Biocontainers:
"""Interface to Biocontainers service
::
>>> from bioservics import Biocontainers
>>> b = Biocontainers()
>>> b.get_tools()
"""
_url = "https://api.biocontainers.pro/ga4gh/trs/v2/"
def __init__(self, verbose=True, cache=False):
"""**Constructor**
:param verbose: set to False to prevent informative messages
"""
self.services = REST(
name="biocontainers",
url=Biocontainers._url,
verbose=verbose,
cache=cache,
url_defined_later=True,
)
[docs] def get_stats(self):
"""Returns some stats about numer of versions and tools"""
res = self.services.http_get("stats")
return res