spirepy ======= .. py:module:: spirepy Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/spirepy/cli/index /autoapi/spirepy/data/index /autoapi/spirepy/genome/index /autoapi/spirepy/logger/index /autoapi/spirepy/sample/index /autoapi/spirepy/study/index Attributes ---------- .. autoapisummary:: spirepy.is_release Classes ------- .. autoapisummary:: spirepy.Study spirepy.Sample Package Contents ---------------- .. py:class:: Study(name: str) A study from SPIRE. This class represents a study from the SPIRE database. It automatically fetches metadata and automates the initialization of samples to further use to obtain its genomic, geographical or other types of data provided by it. :param name: Internal ID for the study. :type name: str .. py:attribute:: name .. py:method:: get_metadata() -> polars.DataFrame Retrieve metadata for the study. :return: A Dataframe with the study's metadata. :rtype: :class:`polars.DataFrame` .. py:method:: get_samples() -> list Retrive a list of samples for the study. :return: List of :class:`spirepy.sample.Sample` that belong to the study. :rtype: list .. py:method:: get_mags() -> polars.DataFrame Get a DataFrame with information regarding the MAGs. :return: A Dataframe with the study's MAGs. :rtype: :class:`polars.DataFrame` .. py:method:: download_assemblies(output: str) Download the assemblies into a specified folder. :param output: Output folder to download the assemblies to. :type output: str .. py:method:: download_mags(output: str) Download the MAGs into a specified folder. :param output: Output folder to download the MAGs to. :type output: str .. py:method:: download_genecalls(output: str) Download the genecalls into a specified folder. :param output: Output folder to download the genecalls to. :type output: str .. py:method:: download_proteins(output: str) Download the proteins into a specified folder. :param output: Output folder to download the proteins to. :type output: str .. py:class:: Sample(id: str, study: spirepy.study.Study = None) A sample from SPIRE. This class represents a sample from the SPIRE database. It is designed to provide all the properties and methods to allow work with samples and provide tools for automation and scalability. :param id: Internal ID for the sample. :type id: str :param study: The :class:`spirepy.study.Study` to which the sample belongs to, defaults to :class:`None`. :type study: :class:`spirepy.study.Study`, optional .. py:attribute:: id .. py:attribute:: study :value: None .. py:method:: get_metadata() -> polars.DataFrame Retrieve the metadata for a sample. :return: A Dataframe with the sample's metadata. :rtype: :class:`polars.DataFrame` .. py:method:: get_mags() -> polars.DataFrame Retrieve the MAGs for a sample. :return: A Dataframe with the sample's MAGs. :rtype: :class:`polars.DataFrame` .. py:method:: get_eggnog_data() -> polars.DataFrame Retrive the EggNOG-mapper data for a sample. :return: A Dataframe with the sample's EggNOG-mapper data. :rtype: :class:`polars.DataFrame` .. py:method:: get_amr_annotations(mode: str = 'deeparg') -> Union[None, polars.DataFrame] Obtain the anti-microbial resistance annotations for the sample. :param mode: Tool to select the AMR data from. Options are deepARG (deeparg), abricate-megares (megares) and abricate-vfdb (vfdb); defaults to deepARG. :type mode: str, optional :return: A Dataframe with the sample's AMR data. :rtype: :class:`polars.DataFrame` .. py:method:: get_contig_depths() -> polars.DataFrame Obtain the contig depth data for the sample. :return: A Dataframe with the sample's contig depth data. :rtype: :class:`polars.DataFrame` .. py:method:: download_mags(out_folder: str) Download the MAGs into a specified folder. :param output: Output folder to download the MAGs to. :type output: str .. py:data:: is_release :value: True