scverse / scverse/squidpy

Infer parameters in `sq.gr.spatial_neighbors` when only one choice

Open
#876 1 comment 0 reactions 1 assignee View on GitHub

@timtreis is already working on this.

Since Aug 21, 2024.

enhancement :sparkles: graph :spider_web: sdata compat :milky_way:
Dominant language
Python
Stars
598
Forks
121
Avg merge
3d 11h
Merged PRs (30d)
3

Description

I'm working on tutorial notebooks right now and ran into a minor hiccup when running sq.gr.spatial_neighbors(). @giovp already ported the function to work with spatialdata (thanks!) but the function requires manual input of the parameters elements_to_coordinate_systems and table_key, even if those are the only options.

I propose to automatically infer these instead when there are no other choices anyway and just notify the user of that fact. Any objections?

sq.gr.spatial_neighbors(
    sdata_merfish,
    elements_to_coordinate_systems={"cells": "global"},
    table_key="table"
)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.