spirepy.sample¶
Classes¶
A sample from SPIRE. |
Module Contents¶
- class spirepy.sample.Sample(id: str, study: spirepy.study.Study = None)[source]¶
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.
- Parameters:
id (str) – Internal ID for the sample.
study (
spirepy.study.Study, optional) – Thespirepy.study.Studyto which the sample belongs to, defaults toNone.
- get_metadata() polars.DataFrame[source]¶
Retrieve the metadata for a sample.
- Returns:
A Dataframe with the sample’s metadata.
- Return type:
polars.DataFrame
- get_mags() polars.DataFrame[source]¶
Retrieve the MAGs for a sample.
- Returns:
A Dataframe with the sample’s MAGs.
- Return type:
polars.DataFrame
- get_eggnog_data() polars.DataFrame[source]¶
Retrive the EggNOG-mapper data for a sample.
- Returns:
A Dataframe with the sample’s EggNOG-mapper data.
- Return type:
polars.DataFrame
- get_amr_annotations(mode: str = 'deeparg') None | polars.DataFrame[source]¶
Obtain the anti-microbial resistance annotations for the sample.
- Parameters:
mode (str, optional) – Tool to select the AMR data from. Options are deepARG (deeparg), abricate-megares (megares) and abricate-vfdb (vfdb); defaults to deepARG.
- Returns:
A Dataframe with the sample’s AMR data.
- Return type:
polars.DataFrame