Metadata-Version: 2.4
Name: metahq-cli
Version: 1.0.0rc2
Summary: The meta-hq CLI.
Author-email: Parker Hicks <parker.hicks@cuanschutz.edu>, Faisal Alquaddoomi <faisal.alquaddoomi@cuanschutz.edu>
License-File: LICENSE
Keywords: CLI,Data Curation,Database,Public Biomedical Data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: click>=8.3.0
Requires-Dist: metahq-core>=0.1.0
Requires-Dist: requests>=2.30.0
Requires-Dist: rich>=13.0.0
Provides-Extra: dev
Requires-Dist: black; extra == 'dev'
Requires-Dist: flake8; extra == 'dev'
Requires-Dist: isort; extra == 'dev'
Requires-Dist: mkdocs-click; extra == 'dev'
Requires-Dist: mkdocs-material; extra == 'dev'
Requires-Dist: mkdocs>=1.6.1; extra == 'dev'
Requires-Dist: mkdocstrings[python]; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pymdown-extensions; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: vulture; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest-benchmark; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest>=8.0; extra == 'test'
Description-Content-Type: text/markdown

<div align="left">
    <img src="https://raw.githubusercontent.com/krishnanlab/meta-hq/main/media/metahq_cli_logo.png" alt="CLI Logo" width="400" />
</div>

![CLI Tests](https://github.com/krishnanlab/meta-hq/workflows/CLI%20Tests/badge.svg)
![Python](https://img.shields.io/badge/python-3.12+-blue.svg)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
![pypi](https://img.shields.io/pypi/v/metahq-cli.svg)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

A command line interface to query the MetaHQ database.

## Key features

- Query standardized and harmonized biomedical annotations
- Access metadata for samples and studies in GEO and SRA
- Convert annotations to labels
- Fast execution time
- Search for relevant ontology terms with free-text queries
- Contribute new annotation sets to the database

## Docs

Source Code: [https://github.com/krishnanlab/meta-hq/tree/main/packages/cli](https://github.com/krishnanlab/meta-hq/tree/main/packages/cli)

## Installation and setup

**To install**:

```bash
pip install metahq-cli
```

**Setup**: This command must be run with every metahq-cli installation. The `setup` command downloads the
MetaHQ database from Zenodo.

```bash
metahq setup --doi latest
```

## Retrieve

Query the MetaHQ database to retrieve sample or study annotations for tissues, diseases, sex, and age.

```bash
metahq retrieve diseases --terms "MONDO:0004994,MONDO:0008903" \
--level sample --filters "species=human,tech=rnaseq,ecode=expert" \
--metadata "sample,series,platform,srp" --fmt parquet
```

## Search

If you do not have ontology terms memorized off-hand, shame on you. However, you can cheat and run the following
command to find the ontology term IDs most similar to a free-text query of a disease, tissue, or cell line.

```bash
metahq search --query "heart attack" --type disease --ontology MONDO
```

## Supported

Run the following to view supported attributes, filters, formats, etc.

```bash
metahq supported
```
