Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* [gget mutate](en/mutate.md)
* [gget opentargets](en/opentargets.md)
* [gget pdb](en/pdb.md)
* [gget pineapple](en/pineapple.md)
* [gget ref](en/ref.md)
* [gget search](en/search.md)
* [gget setup](en/setup.md)
Expand Down Expand Up @@ -71,6 +72,7 @@
* [gget mutate](es/mutate.md)
* [gget opentargets](es/opentargets.md)
* [gget pdb](es/pdb.md)
* [gget pineapple](es/pineapple.md)
* [gget ref](es/ref.md)
* [gget search](es/search.md)
* [gget setup](es/setup.md)
Expand Down
83 changes: 83 additions & 0 deletions docs/src/en/pineapple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[<kbd> View page source on GitHub </kbd>](https://github.com/scverse/gget/blob/main/docs/src/en/pineapple.md)

> Python arguments are equivalent to long-option arguments (`--arg`), unless otherwise specified. Flags are True/False arguments in Python. The manual for any gget tool can be called from the command-line using the `-h` `--help` flag.
# gget pineapple 🍍
List and download curated bio-imaging datasets and pre-trained model weights from [Pineapple](https://github.com/tomouellette/pineapple).
[Pineapple](https://github.com/tomouellette/pineapple) (by Tom Ouellette) is a tool for image-based cell profiling that also curates and standardizes a collection of annotated bio-imaging datasets (segmentation and benchmark) and self-supervised model weights, hosted on Google Drive. `gget pineapple` lets you browse this catalog and download the resources directly — no Rust binary required.
Return format: JSON (command-line) or data frame/CSV (Python).

> **Scope:** `gget pineapple` wraps only Pineapple's data download. It does not reimplement Pineapple's image-processing features (`process`, `profile`, `neural`, `measure`) — use the [Pineapple](https://github.com/tomouellette/pineapple) tool directly for those.

> ⚠️ Please check each dataset's original reference and license (shown in the catalog) before use. Some datasets are non-commercial only.

**Positional argument**
`name`
Name of the dataset/weights to fetch, e.g. `vicar_2021` or `dino_vit_small`. Omit to list the full catalog for the chosen category.

**Optional arguments**
`-c` `--category`
Resource category: `segmentation`, `benchmark`, or `weights`. Default: `segmentation`.

`-od` `--out_dir`
Directory to download the resource into (used with `--download`). Default: current directory.

`-o` `--out`
Path to the file the catalog table will be saved in, e.g. path/to/directory/results.csv (or .json). Default: Standard out.
Python: `save=True` will save the output in the current working directory.

**Flags**
`-d` `--download`
Download the resource (requires a specific `name`) into `--out_dir`. Datasets are large (up to several GB); see the `size_gb` column.

`-csv` `--csv`
Command-line only. Returns results in CSV format.
Python: Use `json=True` to return output in JSON format.

`-q` `--quiet`
Command-line only. Prevents progress information from being displayed.
Python: Use `verbose=False` to prevent progress information from being displayed.

### Examples
**List the available segmentation datasets:**
```bash
gget pineapple --category segmentation
```
```python
# Python
gget.pineapple(category="segmentation")
```
&rarr; Returns the catalog of curated segmentation datasets.

| name | category | data_authors | size_gb | license | filename | google_drive_id |
| --- | --- | --- | --- | --- | --- | --- |
| vicar_2021 | segmentation | Vicar et al. 2021 | 0.113 | CC BY 4.0 | vicar-2021.tar.gz | 12tJOlIHZPFqp8GLek_jV__Uhhgsa530_ |
| . . . | . . . | . . . | . . . | . . . | . . . | . . . |

<br/><br/>
**Download a specific dataset:**
```bash
gget pineapple vicar_2021 --download --out_dir ./pineapple_data
```
```python
# Python
gget.pineapple("vicar_2021", download=True, out_dir="./pineapple_data")
```
&rarr; Downloads `vicar-2021.tar.gz` into `./pineapple_data` and returns the catalog entry.

<br/><br/>
**List the pre-trained model weights:**
```bash
gget pineapple --category weights
```
```python
# Python
gget.pineapple(category="weights")
```
&rarr; Returns the catalog of pre-trained self-supervised model weights (e.g. `dino_vit_small`, `subcell_vit_base`).

# References
If you use `gget pineapple` in a publication, please cite the following article and the original dataset references (listed in the catalog `data_authors` column):

- Pineapple: scalable processing for image-based cell profiling. [https://github.com/tomouellette/pineapple](https://github.com/tomouellette/pineapple)

- Luebbert, L., & Pachter, L. (2023). Efficient querying of genomic reference databases with gget. Bioinformatics. [https://doi.org/10.1093/bioinformatics/btac836](https://doi.org/10.1093/bioinformatics/btac836)
1 change: 1 addition & 0 deletions docs/src/en/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#### *gget* officially became part of [*scverse*](https://scverse.org/) on June 9, 2026. 🥳🥳🥳

**Version ≥ 0.30.9** (XXX XX, 2026):
- [`gget pineapple`](pineapple.md): **New module** to list and download curated bio-imaging datasets and pre-trained model weights from [Pineapple](https://github.com/tomouellette/pineapple) (by Tom Ouellette). Browse the segmentation/benchmark dataset and model-weights catalog (names, authors, sizes, licenses) and download a resource by name directly from its Google Drive host — no Rust binary required. Available in the Python API and on the command line. Resolves [issue 161](https://github.com/scverse/gget/issues/161).

**Version ≥ 0.30.8** (Jun 28, 2026):
- [`gget g2p`](g2p.md): Either `gene` or `--uniprot_id` is now sufficient — whichever is missing is resolved via UniProt and cached. Gene→UniProt picks the canonical reviewed human Swiss-Prot entry; the resolution and its limitations are logged. The canonical pair is **always** prepended to the result as `gene_name` / `uniprot_id` columns (and stored on `df.attrs`), so the output schema is invariant regardless of input mode. Existing call sites continue to work.
Expand Down
83 changes: 83 additions & 0 deletions docs/src/es/pineapple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[<kbd> Ver el codigo fuente de la pagina en GitHub </kbd>](https://github.com/scverse/gget/blob/main/docs/src/es/pineapple.md)

> Parámetros de Python són iguales a los parámetros largos (`--parámetro`) de Terminal, si no especificado de otra manera. Banderas son parámetros de verdadero o falso (True/False) en Python. El manuál para cualquier modulo de gget se puede llamar desde la Terminal con la bandera `-h` `--help`.
# gget pineapple 🍍
Lista y descarga conjuntos de datos de bioimagen curados y pesos de modelos preentrenados desde [Pineapple](https://github.com/tomouellette/pineapple).
[Pineapple](https://github.com/tomouellette/pineapple) (por Tom Ouellette) es una herramienta para el perfilado celular basado en imágenes que además cura y estandariza una colección de conjuntos de datos de bioimagen anotados (segmentación y benchmark) y pesos de modelos autosupervisados, alojados en Google Drive. `gget pineapple` te permite explorar este catálogo y descargar los recursos directamente — sin necesidad del binario de Rust.
Regresa: JSON (línea de comandos) o Dataframe/CSV (Python).

> **Alcance:** `gget pineapple` solo envuelve la descarga de datos de Pineapple. No reimplementa las funciones de procesamiento de imágenes de Pineapple (`process`, `profile`, `neural`, `measure`) — para eso, usa directamente la herramienta [Pineapple](https://github.com/tomouellette/pineapple).

> ⚠️ Por favor revisa la referencia original y la licencia de cada conjunto de datos (mostradas en el catálogo) antes de usarlo. Algunos conjuntos de datos son solo para uso no comercial.

**Parámetro posicional**
`name`
Nombre del conjunto de datos/pesos a obtener, p. ej. `vicar_2021` o `dino_vit_small`. Omítelo para listar el catálogo completo de la categoría elegida.

**Parámetros optionales**
`-c` `--category`
Categoría del recurso: `segmentation`, `benchmark`, o `weights`. Por defecto: `segmentation`.

`-od` `--out_dir`
Directorio en el que se descargará el recurso (se usa con `--download`). Por defecto: directorio actual.

`-o` `--out`
Ruta del archivo en el que se guardará la tabla del catálogo, p. ej. ruta/al/directorio/results.csv (o .json). Por defecto: salida estándar.
Python: `save=True` guardará la salida en el directorio de trabajo actual.

**Banderas**
`-d` `--download`
Descarga el recurso (requiere un `name` específico) en `--out_dir`. Los conjuntos de datos son grandes (hasta varios GB); consulta la columna `size_gb`.

`-csv` `--csv`
Solo para Terminal. Produce los resultados en formato CSV.
Para Python, usa `json=True` para producir la salida en formato JSON.

`-q` `--quiet`
Solo para Terminal. Impide que la información de progreso sea exhibida.
Para Python, usa `verbose=False` para impedir que la información de progreso sea exhibida.

### Ejemplos
**Listar los conjuntos de datos de segmentación disponibles:**
```bash
gget pineapple --category segmentation
```
```python
# Python
gget.pineapple(category="segmentation")
```
&rarr; Produce el catálogo de conjuntos de datos de segmentación curados.

| name | category | data_authors | size_gb | license | filename | google_drive_id |
| --- | --- | --- | --- | --- | --- | --- |
| vicar_2021 | segmentation | Vicar et al. 2021 | 0.113 | CC BY 4.0 | vicar-2021.tar.gz | 12tJOlIHZPFqp8GLek_jV__Uhhgsa530_ |
| . . . | . . . | . . . | . . . | . . . | . . . | . . . |

<br/><br/>
**Descargar un conjunto de datos específico:**
```bash
gget pineapple vicar_2021 --download --out_dir ./pineapple_data
```
```python
# Python
gget.pineapple("vicar_2021", download=True, out_dir="./pineapple_data")
```
&rarr; Descarga `vicar-2021.tar.gz` en `./pineapple_data` y produce la entrada del catálogo.

<br/><br/>
**Listar los pesos de modelos preentrenados:**
```bash
gget pineapple --category weights
```
```python
# Python
gget.pineapple(category="weights")
```
&rarr; Produce el catálogo de pesos de modelos autosupervisados preentrenados (p. ej. `dino_vit_small`, `subcell_vit_base`).

# Citar
Si utiliza `gget pineapple` en una publicación, favor de citar el siguiente recurso y las referencias originales de los conjuntos de datos (listadas en la columna `data_authors` del catálogo):

- Pineapple: scalable processing for image-based cell profiling. [https://github.com/tomouellette/pineapple](https://github.com/tomouellette/pineapple)

- Luebbert, L., & Pachter, L. (2023). Efficient querying of genomic reference databases with gget. Bioinformatics. [https://doi.org/10.1093/bioinformatics/btac836](https://doi.org/10.1093/bioinformatics/btac836)
1 change: 1 addition & 0 deletions gget/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from .gget_mutate import mutate
from .gget_opentargets import opentargets
from .gget_pdb import pdb
from .gget_pineapple import pineapple
from .gget_ref import ref
from .gget_search import search
from .gget_seq import seq
Expand Down
4 changes: 4 additions & 0 deletions gget/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# strategy avoid hanging indefinitely on slow upstreams.
DEFAULT_REQUESTS_TIMEOUT = (10, 60)

# Google Drive download endpoint used by gget pineapple
# (the Pineapple bio-imaging datasets/weights are hosted on Google Drive)
PINEAPPLE_GDRIVE_URL = "https://drive.google.com/uc?export=download"

# Ensembl REST API server for gget seq and info
ENSEMBL_REST_API = "http://rest.ensembl.org/"
ENSEMBL_FTP_URL = "http://ftp.ensembl.org/pub/"
Expand Down
Loading
Loading