gsMap 1.73.4__tar.gz → 1.73.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gsmap-1.73.6/.dockerignore +71 -0
- gsmap-1.73.6/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- gsmap-1.73.6/.github/ISSUE_TEMPLATE/feature_request.md +26 -0
- gsmap-1.73.6/.github/workflows/build.yml +44 -0
- gsmap-1.73.6/.github/workflows/docker-publish.yml +72 -0
- gsmap-1.73.6/.github/workflows/release.yml +176 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/.gitignore +3 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/.pre-commit-config.yaml +4 -2
- gsmap-1.73.6/DOCKER_README.md +130 -0
- gsmap-1.73.6/DOCKER_SETUP.md +138 -0
- gsmap-1.73.6/Dockerfile +31 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/PKG-INFO +11 -6
- {gsmap-1.73.4 → gsmap-1.73.6}/README.md +8 -4
- gsmap-1.73.6/docker-compose.yml +17 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/10x.md +1 -1
- {gsmap-1.73.4 → gsmap-1.73.6}/pyproject.toml +2 -1
- gsmap-1.73.6/src/gsMap/__init__.py +5 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/config.py +58 -5
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/diagnosis.py +25 -13
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/generate_ldscore.py +2 -3
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/run_all_mode.py +6 -2
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/spatial_ldsc_multiple_sumstats.py +1 -1
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/utils/generate_r2_matrix.py +90 -72
- gsmap-1.73.6/src/gsMap/utils/torch_utils.py +23 -0
- gsmap-1.73.4/.github/workflows/publish-to-pypi.yml +0 -97
- gsmap-1.73.4/src/gsMap/__init__.py +0 -5
- {gsmap-1.73.4 → gsmap-1.73.6}/.coveragerc +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/.github/workflows/docs.yml +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/.github/workflows/test_linux.yml +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/.markdownlint.yaml +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/LICENSE +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/codecov.yml +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/Makefile +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/make.bat +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/requirements.txt +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/_static/schematic.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/advanced_usage.md +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/cauchy_combination.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/create_slice_mean.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/find_latent_representations.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/format_sumstats.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/generate_ldscore.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/latent_to_gene.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/quick_mode.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/report.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api/spatial_ldsc.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/api.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/conf.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/data.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/data_format.md +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/index.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/install.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/quick_mode.md +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/release.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/step_by_step.md +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/docs/source/tutorials.rst +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/schematic.png +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/GNN/__init__.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/GNN/adjacency_matrix.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/GNN/model.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/GNN/train.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/__main__.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/cauchy_combination_test.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/create_slice_mean.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/find_latent_representation.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/format_sumstats.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/latent_to_gene.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/main.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/report.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/setup.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/templates/report_template.html +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/utils/__init__.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/utils/jackknife.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/utils/manhattan_plot.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/utils/regression_read.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/src/gsMap/visualize.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/tests/conftest.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/tests/test_advanced_usage.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/tests/test_cli.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/tests/test_docs_cli_parsing.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/Makefile +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/make.bat +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/requirements.txt +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/raw1_add_txt.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/raw2_add_txt.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/raw3_add_txt.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/raw4_add_txt.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/raw5_add_txt.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/_static/schematic.svg +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/conf.py +0 -0
- {gsmap-1.73.4 → gsmap-1.73.6}/visualization_web_docs/source/index.rst +0 -0
@@ -0,0 +1,71 @@
|
|
1
|
+
# Git
|
2
|
+
.git
|
3
|
+
.gitignore
|
4
|
+
|
5
|
+
# Python
|
6
|
+
__pycache__
|
7
|
+
*.pyc
|
8
|
+
*.pyo
|
9
|
+
*.pyd
|
10
|
+
.Python
|
11
|
+
*.egg-info
|
12
|
+
*.egg
|
13
|
+
dist
|
14
|
+
build
|
15
|
+
eggs
|
16
|
+
.eggs
|
17
|
+
parts
|
18
|
+
bin
|
19
|
+
var
|
20
|
+
sdist
|
21
|
+
wheels
|
22
|
+
pip-wheel-metadata
|
23
|
+
*.manifest
|
24
|
+
*.spec
|
25
|
+
|
26
|
+
# Testing
|
27
|
+
.pytest_cache
|
28
|
+
.coverage
|
29
|
+
htmlcov
|
30
|
+
.tox
|
31
|
+
.nox
|
32
|
+
coverage.xml
|
33
|
+
*.cover
|
34
|
+
.hypothesis
|
35
|
+
|
36
|
+
# Jupyter
|
37
|
+
*.ipynb_checkpoints
|
38
|
+
|
39
|
+
# Documentation
|
40
|
+
docs/
|
41
|
+
visualization_web_docs/
|
42
|
+
|
43
|
+
# IDE
|
44
|
+
.vscode
|
45
|
+
.idea
|
46
|
+
*.swp
|
47
|
+
*.swo
|
48
|
+
*~
|
49
|
+
|
50
|
+
# OS
|
51
|
+
.DS_Store
|
52
|
+
Thumbs.db
|
53
|
+
|
54
|
+
# Logs
|
55
|
+
logs/
|
56
|
+
*.log
|
57
|
+
|
58
|
+
# Node
|
59
|
+
node_modules/
|
60
|
+
|
61
|
+
# Cache
|
62
|
+
.ruff_cache/
|
63
|
+
.claude/
|
64
|
+
|
65
|
+
# Other
|
66
|
+
*.png
|
67
|
+
*.jpg
|
68
|
+
*.jpeg
|
69
|
+
*.gif
|
70
|
+
*.bmp
|
71
|
+
*.svg
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve gsMap
|
4
|
+
title: ""
|
5
|
+
labels: bug
|
6
|
+
assignees: ""
|
7
|
+
---
|
8
|
+
|
9
|
+
**Describe the bug**
|
10
|
+
A clear and concise description of what the bug is.
|
11
|
+
|
12
|
+
**To Reproduce**
|
13
|
+
|
14
|
+
```bash
|
15
|
+
# Paste your gsmap script here
|
16
|
+
```
|
17
|
+
|
18
|
+
**Error messages/logs**
|
19
|
+
|
20
|
+
```
|
21
|
+
Paste the error messages or logs here
|
22
|
+
```
|
23
|
+
|
24
|
+
**Environment (please complete the following information):**
|
25
|
+
- Python version: [output of python --version]
|
26
|
+
- gsMap version: [output of gsmap --version]
|
27
|
+
- OS: [e.g. Ubuntu 22.04, macOS 13]
|
28
|
+
|
29
|
+
**Input data information (if applicable):**
|
30
|
+
- ST data description: [e.g. 10x Visium, Stero-seq, etc.]
|
31
|
+
- Data dimensions: [e.g. 10,000 spots × 20,000 genes]
|
32
|
+
|
33
|
+
**Additional context**
|
34
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for gsMap
|
4
|
+
title: '[FEATURE] '
|
5
|
+
labels: 'enhancement'
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Use case**
|
20
|
+
Describe the use case for this feature. How would it benefit users of gsMap?
|
21
|
+
|
22
|
+
**Relevant literature or methods**
|
23
|
+
If applicable, provide references to relevant papers, methods, or algorithms that support this feature.
|
24
|
+
|
25
|
+
**Additional context**
|
26
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,44 @@
|
|
1
|
+
name: Build and Test
|
2
|
+
|
3
|
+
# CI workflow that builds and validates the Python package on every push/PR
|
4
|
+
# This ensures the package is always in a buildable state
|
5
|
+
# For actual releases, use the release.yml workflow triggered by tags
|
6
|
+
on:
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
pull_request:
|
11
|
+
branches:
|
12
|
+
- main
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
build:
|
16
|
+
name: Build distribution 📦
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
- name: Set up Python
|
22
|
+
uses: actions/setup-python@v4
|
23
|
+
with:
|
24
|
+
python-version: "3.x"
|
25
|
+
- name: Install pypa/build
|
26
|
+
run: >-
|
27
|
+
python3 -m
|
28
|
+
pip install
|
29
|
+
flit
|
30
|
+
--user
|
31
|
+
- name: Build a binary wheel and a source tarball
|
32
|
+
run: |
|
33
|
+
flit build
|
34
|
+
ls -lh dist
|
35
|
+
- name: Verify the built packages
|
36
|
+
run: |
|
37
|
+
python3 -m pip install --upgrade pip
|
38
|
+
python3 -m pip install twine
|
39
|
+
twine check dist/*
|
40
|
+
- name: Store the distribution packages
|
41
|
+
uses: actions/upload-artifact@v4
|
42
|
+
with:
|
43
|
+
name: python-package-distributions
|
44
|
+
path: dist/
|
@@ -0,0 +1,72 @@
|
|
1
|
+
name: Build Docker Image (Manual)
|
2
|
+
|
3
|
+
# This workflow is for manual Docker builds only
|
4
|
+
# For automatic releases, the release.yml workflow handles everything when you push a tag
|
5
|
+
on:
|
6
|
+
workflow_dispatch: # Manual trigger only
|
7
|
+
inputs:
|
8
|
+
tag:
|
9
|
+
description: 'Docker image tag (e.g., dev, test, custom-tag)'
|
10
|
+
required: false
|
11
|
+
default: 'manual'
|
12
|
+
push:
|
13
|
+
description: 'Push to registry (true/false)'
|
14
|
+
required: false
|
15
|
+
default: 'false'
|
16
|
+
|
17
|
+
env:
|
18
|
+
REGISTRY: ghcr.io
|
19
|
+
# Convert repository name to lowercase for Docker compatibility
|
20
|
+
IMAGE_NAME: ${{ github.repository }}
|
21
|
+
|
22
|
+
jobs:
|
23
|
+
build-and-push:
|
24
|
+
name: Build Docker Image (Manual)
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
permissions:
|
27
|
+
contents: read
|
28
|
+
packages: write
|
29
|
+
attestations: write
|
30
|
+
id-token: write
|
31
|
+
|
32
|
+
steps:
|
33
|
+
- name: Checkout repository
|
34
|
+
uses: actions/checkout@v4
|
35
|
+
|
36
|
+
- name: Convert repository name to lowercase
|
37
|
+
id: repo
|
38
|
+
run: echo "name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
39
|
+
|
40
|
+
- name: Set up Docker Buildx
|
41
|
+
uses: docker/setup-buildx-action@v3
|
42
|
+
|
43
|
+
- name: Log in to GitHub Container Registry
|
44
|
+
if: ${{ github.event.inputs.push == 'true' }}
|
45
|
+
uses: docker/login-action@v3
|
46
|
+
with:
|
47
|
+
registry: ${{ env.REGISTRY }}
|
48
|
+
username: ${{ github.actor }}
|
49
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
50
|
+
|
51
|
+
- name: Build Docker image
|
52
|
+
uses: docker/build-push-action@v5
|
53
|
+
with:
|
54
|
+
context: .
|
55
|
+
platforms: linux/amd64,linux/arm64
|
56
|
+
push: ${{ github.event.inputs.push == 'true' }}
|
57
|
+
tags: ${{ env.REGISTRY }}/${{ steps.repo.outputs.name }}:${{ github.event.inputs.tag }}
|
58
|
+
cache-from: type=gha
|
59
|
+
cache-to: type=gha,mode=max
|
60
|
+
|
61
|
+
- name: Output instructions
|
62
|
+
run: |
|
63
|
+
if [ "${{ github.event.inputs.push }}" == "true" ]; then
|
64
|
+
echo "✅ Docker image pushed to: ${{ env.REGISTRY }}/${{ steps.repo.outputs.name }}:${{ github.event.inputs.tag }}"
|
65
|
+
echo ""
|
66
|
+
echo "Pull with:"
|
67
|
+
echo " docker pull ${{ env.REGISTRY }}/${{ steps.repo.outputs.name }}:${{ github.event.inputs.tag }}"
|
68
|
+
else
|
69
|
+
echo "✅ Docker image built locally (not pushed)"
|
70
|
+
echo ""
|
71
|
+
echo "To push manually, re-run workflow with push=true"
|
72
|
+
fi
|
@@ -0,0 +1,176 @@
|
|
1
|
+
name: Release Pipeline
|
2
|
+
|
3
|
+
# This is the main release workflow that handles everything when you push a version tag
|
4
|
+
# It builds Python packages, Docker images, publishes to PyPI and ghcr.io, and creates GitHub releases
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
tags:
|
8
|
+
- 'v*' # Trigger ONLY on version tags
|
9
|
+
workflow_dispatch:
|
10
|
+
inputs:
|
11
|
+
tag:
|
12
|
+
description: 'Tag to release (e.g., v1.0.0)'
|
13
|
+
required: true
|
14
|
+
type: string
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
build-python:
|
18
|
+
name: Build Python distribution 📦
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v4
|
22
|
+
- name: Set up Python
|
23
|
+
uses: actions/setup-python@v5
|
24
|
+
with:
|
25
|
+
python-version: "3.x"
|
26
|
+
- name: Install build dependencies
|
27
|
+
run: |
|
28
|
+
python -m pip install --upgrade pip
|
29
|
+
pip install flit
|
30
|
+
- name: Build package
|
31
|
+
run: |
|
32
|
+
flit build
|
33
|
+
ls -lh dist
|
34
|
+
- name: Store the distribution packages
|
35
|
+
uses: actions/upload-artifact@v4
|
36
|
+
with:
|
37
|
+
name: python-package-distributions
|
38
|
+
path: dist/
|
39
|
+
|
40
|
+
publish-pypi:
|
41
|
+
name: Publish to PyPI 🐍
|
42
|
+
needs: build-python
|
43
|
+
runs-on: ubuntu-latest
|
44
|
+
environment:
|
45
|
+
name: pypi
|
46
|
+
url: https://pypi.org/p/gsMap
|
47
|
+
permissions:
|
48
|
+
id-token: write
|
49
|
+
steps:
|
50
|
+
- name: Download distributions
|
51
|
+
uses: actions/download-artifact@v4
|
52
|
+
with:
|
53
|
+
name: python-package-distributions
|
54
|
+
path: dist/
|
55
|
+
- name: Publish to PyPI
|
56
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
57
|
+
|
58
|
+
build-docker:
|
59
|
+
name: Build Docker images 🐳
|
60
|
+
runs-on: ubuntu-latest
|
61
|
+
permissions:
|
62
|
+
contents: read
|
63
|
+
packages: write
|
64
|
+
attestations: write
|
65
|
+
id-token: write
|
66
|
+
steps:
|
67
|
+
- name: Checkout repository
|
68
|
+
uses: actions/checkout@v4
|
69
|
+
|
70
|
+
- name: Convert repository name to lowercase
|
71
|
+
id: repo
|
72
|
+
run: echo "name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
73
|
+
|
74
|
+
- name: Set up Docker Buildx
|
75
|
+
uses: docker/setup-buildx-action@v3
|
76
|
+
|
77
|
+
- name: Log in to GitHub Container Registry
|
78
|
+
uses: docker/login-action@v3
|
79
|
+
with:
|
80
|
+
registry: ghcr.io
|
81
|
+
username: ${{ github.actor }}
|
82
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
83
|
+
|
84
|
+
- name: Extract metadata
|
85
|
+
id: meta
|
86
|
+
uses: docker/metadata-action@v5
|
87
|
+
with:
|
88
|
+
images: ghcr.io/${{ steps.repo.outputs.name }}
|
89
|
+
tags: |
|
90
|
+
type=semver,pattern={{version}}
|
91
|
+
type=semver,pattern={{major}}.{{minor}}
|
92
|
+
type=semver,pattern={{major}}
|
93
|
+
type=raw,value=latest
|
94
|
+
|
95
|
+
- name: Build and push Docker image
|
96
|
+
id: push
|
97
|
+
uses: docker/build-push-action@v5
|
98
|
+
with:
|
99
|
+
context: .
|
100
|
+
platforms: linux/amd64,linux/arm64
|
101
|
+
push: true
|
102
|
+
tags: ${{ steps.meta.outputs.tags }}
|
103
|
+
labels: ${{ steps.meta.outputs.labels }}
|
104
|
+
cache-from: type=gha
|
105
|
+
cache-to: type=gha,mode=max
|
106
|
+
|
107
|
+
- name: Generate artifact attestation
|
108
|
+
uses: actions/attest-build-provenance@v1
|
109
|
+
with:
|
110
|
+
subject-name: ghcr.io/${{ steps.repo.outputs.name }}
|
111
|
+
subject-digest: ${{ steps.push.outputs.digest }}
|
112
|
+
push-to-registry: true
|
113
|
+
|
114
|
+
create-release:
|
115
|
+
name: Create GitHub Release 📝
|
116
|
+
needs: [publish-pypi, build-docker]
|
117
|
+
runs-on: ubuntu-latest
|
118
|
+
permissions:
|
119
|
+
contents: write
|
120
|
+
id-token: write
|
121
|
+
steps:
|
122
|
+
- name: Checkout repository
|
123
|
+
uses: actions/checkout@v4
|
124
|
+
|
125
|
+
- name: Download Python distributions
|
126
|
+
uses: actions/download-artifact@v4
|
127
|
+
with:
|
128
|
+
name: python-package-distributions
|
129
|
+
path: dist/
|
130
|
+
|
131
|
+
- name: Sign distributions with Sigstore
|
132
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
133
|
+
with:
|
134
|
+
inputs: >-
|
135
|
+
./dist/*.tar.gz
|
136
|
+
./dist/*.whl
|
137
|
+
|
138
|
+
- name: Generate Release Notes
|
139
|
+
id: release_notes
|
140
|
+
run: |
|
141
|
+
VERSION="${GITHUB_REF#refs/tags/}"
|
142
|
+
echo "# gsMap ${VERSION}" > release_notes.md
|
143
|
+
echo "" >> release_notes.md
|
144
|
+
echo "## 📦 Installation" >> release_notes.md
|
145
|
+
echo "" >> release_notes.md
|
146
|
+
echo "### PyPI" >> release_notes.md
|
147
|
+
echo '```bash' >> release_notes.md
|
148
|
+
echo "pip install gsMap==${VERSION#v}" >> release_notes.md
|
149
|
+
echo '```' >> release_notes.md
|
150
|
+
echo "" >> release_notes.md
|
151
|
+
echo "### Docker" >> release_notes.md
|
152
|
+
echo '```bash' >> release_notes.md
|
153
|
+
echo "docker pull ghcr.io/${{ github.repository }}:${VERSION#v}" >> release_notes.md
|
154
|
+
echo '```' >> release_notes.md
|
155
|
+
echo "" >> release_notes.md
|
156
|
+
echo "## 📋 What's Changed" >> release_notes.md
|
157
|
+
echo "" >> release_notes.md
|
158
|
+
echo "See [full changelog](https://github.com/${{ github.repository }}/compare/$(git describe --tags --abbrev=0 ${GITHUB_REF}^)...${VERSION})" >> release_notes.md
|
159
|
+
|
160
|
+
- name: Create GitHub Release
|
161
|
+
env:
|
162
|
+
GITHUB_TOKEN: ${{ github.token }}
|
163
|
+
run: |
|
164
|
+
gh release create \
|
165
|
+
'${{ github.ref_name }}' \
|
166
|
+
--repo '${{ github.repository }}' \
|
167
|
+
--title "gsMap ${{ github.ref_name }}" \
|
168
|
+
--notes-file release_notes.md
|
169
|
+
|
170
|
+
- name: Upload artifacts to GitHub Release
|
171
|
+
env:
|
172
|
+
GITHUB_TOKEN: ${{ github.token }}
|
173
|
+
run: |
|
174
|
+
gh release upload \
|
175
|
+
'${{ github.ref_name }}' dist/** \
|
176
|
+
--repo '${{ github.repository }}'
|
@@ -5,6 +5,8 @@ default_stages:
|
|
5
5
|
- pre-commit
|
6
6
|
- pre-push
|
7
7
|
minimum_pre_commit_version: 2.16.0
|
8
|
+
ci:
|
9
|
+
autoupdate_schedule: quarterly
|
8
10
|
repos:
|
9
11
|
- repo: https://github.com/asottile/blacken-docs
|
10
12
|
rev: 1.19.1
|
@@ -29,7 +31,7 @@ repos:
|
|
29
31
|
)$
|
30
32
|
|
31
33
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
32
|
-
rev: v0.
|
34
|
+
rev: v0.45.0
|
33
35
|
hooks:
|
34
36
|
- id: markdownlint-fix
|
35
37
|
exclude: |
|
@@ -38,7 +40,7 @@ repos:
|
|
38
40
|
)$
|
39
41
|
|
40
42
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
41
|
-
rev: v0.
|
43
|
+
rev: v0.12.2
|
42
44
|
hooks:
|
43
45
|
- id: ruff
|
44
46
|
args: [--fix, --exit-non-zero-on-fix]
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# Docker Setup for gsMap
|
2
|
+
|
3
|
+
This guide explains how to build and run gsMap using Docker for reproducible analysis.
|
4
|
+
|
5
|
+
## Quick Start - Using Pre-built Images
|
6
|
+
|
7
|
+
The easiest way to use gsMap with Docker is to pull the pre-built image from GitHub Container Registry:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
# Pull the latest image
|
11
|
+
docker pull ghcr.io/jianyang-lab/gsmap:latest
|
12
|
+
|
13
|
+
# Or pull a specific version
|
14
|
+
docker pull ghcr.io/jianyang-lab/gsmap:v1.0.0
|
15
|
+
|
16
|
+
# Run gsMap
|
17
|
+
docker run --rm ghcr.io/jianyang-lab/gsmap:latest --help
|
18
|
+
```
|
19
|
+
|
20
|
+
## Prerequisites
|
21
|
+
|
22
|
+
- Docker installed on your system
|
23
|
+
- Docker Compose (optional, for easier management)
|
24
|
+
|
25
|
+
## Building the Docker Image
|
26
|
+
|
27
|
+
### Option 1: Using Docker directly
|
28
|
+
|
29
|
+
```bash
|
30
|
+
# Build the image
|
31
|
+
docker build -t gsmap:latest .
|
32
|
+
```
|
33
|
+
|
34
|
+
### Option 2: Using Docker Compose
|
35
|
+
|
36
|
+
```bash
|
37
|
+
# Build the image using docker-compose
|
38
|
+
docker-compose build
|
39
|
+
```
|
40
|
+
|
41
|
+
## Running gsMap in Docker
|
42
|
+
|
43
|
+
### Using Docker directly
|
44
|
+
|
45
|
+
```bash
|
46
|
+
# Show help
|
47
|
+
docker run --rm gsmap:latest --help
|
48
|
+
|
49
|
+
# Run with mounted data directory
|
50
|
+
docker run --rm \
|
51
|
+
-v $(pwd)/data:/data \
|
52
|
+
-v $(pwd)/results:/results \
|
53
|
+
gsmap:latest [subcommand] [options]
|
54
|
+
|
55
|
+
# Example: Run a specific gsMap command
|
56
|
+
docker run --rm \
|
57
|
+
-v $(pwd)/data:/data \
|
58
|
+
-v $(pwd)/results:/results \
|
59
|
+
gsmap:latest format-sumstats \
|
60
|
+
--sumstats /data/input.txt \
|
61
|
+
--out /results/output
|
62
|
+
```
|
63
|
+
|
64
|
+
### Using Docker Compose
|
65
|
+
|
66
|
+
```bash
|
67
|
+
# Show help
|
68
|
+
docker-compose run --rm gsmap --help
|
69
|
+
|
70
|
+
# Run a specific command
|
71
|
+
docker-compose run --rm gsmap [subcommand] [options]
|
72
|
+
|
73
|
+
# Example with custom command
|
74
|
+
docker-compose run --rm gsmap format-sumstats \
|
75
|
+
--sumstats /data/input.txt \
|
76
|
+
--out /results/output
|
77
|
+
```
|
78
|
+
|
79
|
+
## Volume Mounts
|
80
|
+
|
81
|
+
The Docker setup includes two default volume mounts:
|
82
|
+
- `./data:/data` - For input data files
|
83
|
+
- `./results:/results` - For output results
|
84
|
+
|
85
|
+
Place your input files in the `data/` directory and reference them with `/data/` prefix in commands.
|
86
|
+
Results will be saved to the `results/` directory.
|
87
|
+
|
88
|
+
## Interactive Shell
|
89
|
+
|
90
|
+
To get an interactive shell for debugging:
|
91
|
+
|
92
|
+
```bash
|
93
|
+
# Using Docker
|
94
|
+
docker run --rm -it \
|
95
|
+
-v $(pwd)/data:/data \
|
96
|
+
-v $(pwd)/results:/results \
|
97
|
+
--entrypoint /bin/bash \
|
98
|
+
gsmap:latest
|
99
|
+
|
100
|
+
# Using Docker Compose
|
101
|
+
docker-compose run --rm --entrypoint /bin/bash gsmap
|
102
|
+
```
|
103
|
+
|
104
|
+
## Tips for Reproducibility
|
105
|
+
|
106
|
+
1. **Pin versions**: Consider updating the Dockerfile to use specific versions of dependencies
|
107
|
+
2. **Document data**: Keep track of input data versions and sources
|
108
|
+
3. **Tag images**: Use version tags for your Docker images
|
109
|
+
```bash
|
110
|
+
docker build -t gsmap:v1.0.0 .
|
111
|
+
```
|
112
|
+
4. **Save configurations**: Store your command parameters in scripts or configuration files
|
113
|
+
|
114
|
+
## Multi-platform builds (Optional)
|
115
|
+
|
116
|
+
For building images that work on different architectures (e.g., AMD64, ARM64):
|
117
|
+
|
118
|
+
```bash
|
119
|
+
# Setup buildx (one-time)
|
120
|
+
docker buildx create --name mybuilder --use
|
121
|
+
|
122
|
+
# Build for multiple platforms
|
123
|
+
docker buildx build --platform linux/amd64,linux/arm64 -t gsmap:latest --push .
|
124
|
+
```
|
125
|
+
|
126
|
+
## Troubleshooting
|
127
|
+
|
128
|
+
- If you encounter memory issues, increase Docker's memory limit in Docker Desktop settings
|
129
|
+
- For permission issues with mounted volumes, ensure the data and results directories have appropriate permissions
|
130
|
+
- If builds are slow, consider using a `.dockerignore` file to exclude unnecessary files
|