Skip to main content

PyPI Install Test Status Documentation Status License: MIT

SPIREpy

SPIREpy is a Python package and command-line tool that allows users to interact with the SPIRE database in a more convinient way.

Installation

SPIREpy is available on PyPI and can be installed via

pip install spirepy  

Quickstart

Python package

The Python package encapsulates the study and samples types from SPIRE into classes with properties that allow you to access and interact with their data. To load a study, we do:

from spirepy import Study

study = Study("Lloyd-Price_2019_HMP2IBD")

We can then obtain the list of samples that belong to this study.

study.get_samples()  

The study's metadata:

study.get_metadata()

Or even the assembled genomes:

study.get_mags()

Likewise, many of these attributes and operations are parallel to samples (Sample class) as well. For the full documentation and how to interact with them, see here

Command-line tool

The command-line interface tool allows the interaction with data from SPIRE directly in the terminal. It possesses 2 main interfaces:

  • view
  • download

These 2 sub-commands allows us to print tables and download data from both studies and samples. For more information on the available commands use:

spire --help

To view a study's metadata we can use:

spire --study view metadata Lloyd-Price_2019_HMP2IBD

And to download the same table as a .csv file we can instead:

spire --study download metadata Lloyd-Price_2019_HMP2IBD -o study/

Documentation

Documentation for the Python package and CLI tool can be found here.

Credits

These tools have been developed by the Big Data Biology Lab at the Centre for Microbiome Research at the Queensland University of Technology (Brisbane, Australia). It is part of the SPIRE: a Searchable, Planetary-scale mIcrobiome REsource project.

SPIRE is published in

Thomas S B Schmidt, Anthony Fullam, Pamela Ferretti, Askarbek Orakov, Oleksandr
M Maistrenko, Hans-Joachim Ruscheweyh, Ivica Letunic, Yiqian Duan, Thea Van
Rossum, Shinichi Sunagawa, Daniel R Mende, Robert D Finn, Michael Kuhn, Luis
Pedro Coelho, Peer Bork, SPIRE: a Searchable, Planetary-scale mIcrobiome
REsource, Nucleic Acids Research, Volume 52, Issue D1, 5 January 2024, Pages
D777–D783
https://doi.org/10.1093/nar/gkad943

Please cite this publication when referencing SPIREpy.

Metadata

Release files for spirepy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spirepy 0.2.0
File Size Uploaded
spirepy-0.2.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spirepy 0.2.0
File Interpreter ABI Platform
spirepy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.3 kB

Release files / spirepy-0.2.0.tar.gz

Download URL spirepy-0.2.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a11d8d5dd8a77e2eca60addcbe1e7469f1913dd2514b4f21b9f51040360c6910
BLAKE2b-256 checksum
How to use checksums
ebea316a9b06510329aaa53cb3c6909ef60718ae43ff065a1ce69d2433bfa84f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / spirepy-0.2.0-py3-none-any.whl

Download URL spirepy-0.2.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
befb9063b0afe195151e27b639c96072cbb6f2cd36df4831bd538b9c13b0b698
BLAKE2b-256 checksum
How to use checksums
06b827aa51308eb3671203f9a4d754be935c8a3aeb44bc9c1f5d31c1bfaf06b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page