https://github.com/snakemake/snakemake-storage-plugin-azure
Snakemake storage plugin for Azure Blob Storage
https://github.com/snakemake/snakemake-storage-plugin-azure
Last synced: over 1 year ago
JSON representation
Snakemake storage plugin for Azure Blob Storage
- Host: GitHub
- URL: https://github.com/snakemake/snakemake-storage-plugin-azure
- Owner: snakemake
- License: mit
- Created: 2023-11-03T20:48:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T13:19:31.000Z (over 1 year ago)
- Last Synced: 2025-03-24T13:28:16.004Z (over 1 year ago)
- Language: Python
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Snakemake Storage Plugin Azure
Azure Blob Storage plugin for snakemake. For documentation and usage instructions, see the [Snakemake Plugin Catalog](https://snakemake.github.io/snakemake-plugin-catalog/plugins/storage/azure.html).
# Testing
Testing this plugin locally require the azurite storage emulator to be running locally.
This can be setup using the following docker run command:
```
docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0
```
Then execute the tests:
```
poetry run coverage run -m pytest tests/tests.py
```
# Example
The below example Snakefile and command will stream a file, test.txt, containing the text "Hello, World" to the azure blob: https://accountname.blob.core.windows.net/container/test.txt
```Snakefile
rule touch:
output: "test.txt"
shell:
"echo 'Hello, World!' > {output}"
```
**Command:**
The storage account and container that the output file is streamed to is specified using the default-storage-prefix.
```
snakemake -j1 \
--default-storage-provider azure \
--default-storage-prefix "az://container"
--storage-azure-account-name accountname \
--verbose
```