spirepy.sample ============== .. py:module:: spirepy.sample Classes ------- .. autoapisummary:: spirepy.sample.Sample Module Contents --------------- .. 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