Snakemake storage plugin: xrootd
Warning
No documentation found in repository https://github.com/snakemake/snakemake-storage-plugin-xrootd. The plugin should provide a docs/intro.md with some introductory sentences and optionally a docs/further.md file with details beyond the auto-generated usage instractions presented in this catalog.
Installation
Install this plugin by installing it with pip or mamba, e.g.:
pip install snakemake-storage-plugin-xrootd
Usage
Queries
Queries to this storage should have the following format:
Query type |
Query |
Description |
---|---|---|
any |
|
A file on an XrootD instance. Note that we omit the host name from the query as that is given via the settings of the storage provider. |
As default provider
If you want all your input and output (which is not explicitly marked to come from another storage) to be written to and read from this storage, you can use it as a default provider via:
snakemake --default-storage-provider xrootd --default-storage-prefix ...
with ...
being the prefix of a query under which you want to store all your
results.
You can also pass custom settings via command line arguments:
snakemake --default-storage-provider xrootd --default-storage-prefix ... \
--storage-xrootd-max-requests-per-second ... \ --storage-xrootd-host ... \ --storage-xrootd-port ... \ --storage-xrootd-username ... \ --storage-xrootd-password ... \ --storage-xrootd-query-params ...
Within the workflow
If you want to use this storage plugin only for specific items, you can register it inside of your workflow:
# register storage provider (not needed if no custom settings are to be defined here)
storage:
provider="xrootd",
# optionally add custom settings here if needed
# alternatively they can be passed via command line arguments
# starting with --storage-xrootd-..., see
# snakemake --help
# Maximum number of requests per second for this storage provider. If nothing is specified, the default implemented by the storage plugin is used.
max_requests_per_second=...,
# The XrootD host to connect to
host=...,
# The XrootD port to connect to
port=...,
# The username to use for authentication
username=...,
# The password to use for authentication
password=...,
# Optional query parameters for XRootD (e.g. xrd.wantprot=unix, authz=XXXXXX)
query_params=...,
rule example:
input:
storage.xrootd(
# define query to the storage backend here
...
),
output:
"example.txt"
shell:
"..."
Using multiple entities of the same storage plugin
In case you have to use this storage plugin multiple times, but with different settings (e.g. to connect to different storage servers), you can register it multiple times, each time providing a different tag:
# register shared settings
storage:
provider="xrootd",
# optionally add custom settings here if needed
# alternatively they can be passed via command line arguments
# starting with --storage-xrootd-..., see below
# Maximum number of requests per second for this storage provider. If nothing is specified, the default implemented by the storage plugin is used.
max_requests_per_second=...,
# The XrootD host to connect to
host=...,
# The XrootD port to connect to
port=...,
# The username to use for authentication
username=...,
# The password to use for authentication
password=...,
# Optional query parameters for XRootD (e.g. xrd.wantprot=unix, authz=XXXXXX)
query_params=...,
# register multiple tagged entities
storage foo:
provider="xrootd",
# optionally add custom settings here if needed
# alternatively they can be passed via command line arguments
# starting with --storage-xrootd-..., see below.
# To only pass a setting to this tagged entity, prefix the given value with
# the tag name, i.e. foo:max_requests_per_second=...
# Maximum number of requests per second for this storage provider. If nothing is specified, the default implemented by the storage plugin is used.
max_requests_per_second=...,
# The XrootD host to connect to
host=...,
# The XrootD port to connect to
port=...,
# The username to use for authentication
username=...,
# The password to use for authentication
password=...,
# Optional query parameters for XRootD (e.g. xrd.wantprot=unix, authz=XXXXXX)
query_params=...,
rule example:
input:
storage.foo(
# define query to the storage backend here
...
),
output:
"example.txt"
shell:
"..."
Settings
The storage plugin has the following settings (which can be passed via command line, the workflow or environment variables, if provided in the respective columns):
CLI setting |
Workflow setting |
Envvar setting |
Description |
Default |
Choices |
Required |
Type |
---|---|---|---|---|---|---|---|
|
|
Maximum number of requests per second for this storage provider. If nothing is specified, the default implemented by the storage plugin is used. |
|
✗ |
str |
||
|
|
The XrootD host to connect to |
|
✓ |
str |
||
|
|
The XrootD port to connect to |
|
✗ |
str |
||
|
|
|
The username to use for authentication |
|
✗ |
str |
|
|
|
|
The password to use for authentication |
|
✗ |
str |
|
|
|
|
Optional query parameters for XRootD (e.g. xrd.wantprot=unix, authz=XXXXXX) |
|
✗ |
str |