Skip to content

Commit 1079a31

Browse files
authored
Revise README for installation and usage clarity
Updated installation instructions and usage examples for clarity and accuracy.
1 parent 83ff1aa commit 1079a31

1 file changed

Lines changed: 9 additions & 83 deletions

File tree

README.md

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,37 @@
1-
```markdown
21
# Xenium Analysis Tools
32

4-
A Python library for processing and mapping Xenium spatial data, developed by the Allen Institute for Neural Dynamics.
3+
A Python library for processing and mapping Xenium sections using SpatialData formatting.
54

65
## Installation
76

8-
### Code Ocean Package Manager (Recommended)
9-
This library can be installed directly via the Code Ocean environment manager.
7+
### Code Ocean Package Manager
8+
pip: git+[https://github.com/AllenInstitute/xenium_analysis_tools#egg=xenium-analysis-tools]
109

11-
1. Open your Capsule.
12-
2. Go to the **Environment** tab.
13-
3. In the **Pip** section, click **Add**.
14-
4. Paste the following link:
15-
```text
16-
git+[https://github.com/AllenInstitute/xenium_analysis_tools#egg=xenium-analysis-tools](https://github.com/AllenInstitute/xenium_analysis_tools#egg=xenium-analysis-tools)
17-
18-
```
19-
20-
5. Click **Launch Cloud Workstation** to build.
21-
22-
### Local Installation
23-
24-
To install locally or in a standard terminal:
25-
26-
```bash
27-
pip install git+[https://github.com/AllenInstitute/xenium_analysis_tools.git](https://github.com/AllenInstitute/xenium_analysis_tools.git)
28-
29-
```
3010

3111
---
3212

3313
## Modules
3414

35-
The library is organized into three primary sub-packages designed to handle different stages of the Xenium analysis pipeline.
36-
3715
### 1. `process_xenium`
3816

3917
Tools for processing raw Xenium outputs, managing SpatialData objects, and preparing data for downstream analysis.
4018

41-
* **`process_dataset_slides`**: Main workflow for processing slides across an entire dataset.
19+
#### Main processing functions:
20+
* **`generate_dataset_slides`**: Generate the slide-level SpatialData objects from Xenium bundles for a Xenium dataset.
21+
* **`process_dataset_slides`**: Generate the section-level SpatialData objects from slides for a Xenium dataset.
22+
#### Task-specific functions:
4223
* **`process_spatialdata`**: Core logic for manipulating and formatting Xenium `SpatialData` objects.
4324
* **`divide_sections`**: Utilities for handling section boundaries and splitting data.
4425
* **`validate_sections`**: Quality control checks to ensure section integrity before processing.
45-
* **`generate_dataset_slides`**: Helper functions for creating slide-level representations.
4626

4727
### 2. `map_xenium`
4828

4929
Functions for mapping cell types to Xenium data using reference taxonomies.
5030

51-
* **`map_sections`**: Logic for mapping cell types on individual tissue sections.
31+
#### Main processing function:
5232
* **`map_dataset_sections`**: Batch processing tools to apply mapping across multiple sections in a dataset.
33+
* **`map_sections`**: Logic for mapping cell types on individual sections.
5334

5435
### 3. `utils`
55-
5636
Shared utility functions used across the library.
57-
5837
* **`io_utils`**: Standardized functions for loading and saving Xenium data structures.
59-
60-
---
61-
62-
## Usage
63-
64-
Import the specific modules you need for your analysis workflow.
65-
66-
**Example: Processing a Dataset**
67-
68-
```python
69-
from xenium_analysis_tools.process_xenium import process_dataset_slides
70-
from xenium_analysis_tools.utils import io_utils
71-
72-
# Load your configuration or data path
73-
data_path = "/path/to/xenium/data"
74-
75-
# Run the processing pipeline
76-
process_dataset_slides.run(data_path)
77-
78-
```
79-
80-
**Example: Mapping Sections**
81-
82-
```python
83-
from xenium_analysis_tools.map_xenium import map_dataset_sections
84-
85-
# Run cell type mapping on processed sections
86-
map_dataset_sections.run_mapping(
87-
processed_data_path="/path/to/processed/data",
88-
taxonomy_ref="/path/to/taxonomy"
89-
)
90-
91-
```
92-
93-
---
94-
95-
## Development
96-
97-
### Updating the Package
98-
99-
1. Make changes to the code in the `src/` directory.
100-
2. Bump the version in `src/xenium_analysis_tools/__init__.py`.
101-
3. Commit and push to GitHub.
102-
4. Create and push a new tag matching the version (e.g., `v0.1.1`).
103-
104-
### Running Tests
105-
106-
This project uses `pytest`. Run the following in the root directory:
107-
108-
```bash
109-
pytest tests/
110-
111-
```

0 commit comments

Comments
 (0)