Skip to content

Commit 768a088

Browse files
author
Gordon J. Köhn
committed
WIP: adjusting to sr2silo v1.1.0
1 parent 777ce7e commit 768a088

3 files changed

Lines changed: 36 additions & 18 deletions

File tree

workflow/envs/sr2silo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ channels:
22
- conda-forge
33
- bioconda
44
dependencies:
5-
- sr2silo=1.0.1
5+
- sr2silo=1.1.0

workflow/rules/publish.smk

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,13 @@ rule silo_preprocess:
201201
nuc_alignment=alignment_wildcard,
202202
timeline_file=(
203203
config.tallymut.get("timeline_file", None) or cohortdir("timeline.tsv")
204-
),
205-
primers_file=config["input"]["protocols_file"],
204+
)
206205
output:
207206
silo_input="{dataset}/alignments/silo_input.ndjson.zst",
208207
params:
209208
s_rec=get_s_rec,
210-
nextclade_reference=config["loculus"]["nextclade_reference"],
211209
SR2SILO=config["applications"]["sr2silo"],
210+
lapis_url=config["loculus"]["lapis-url"],
212211
log:
213212
outfile="{dataset}/alignments/silo_input.out.log",
214213
errfile="{dataset}/alignments/silo_input.out.err",
@@ -226,11 +225,9 @@ rule silo_preprocess:
226225
{params.SR2SILO} process-from-vpipe \
227226
--input-file "{input.nuc_alignment}" \
228227
--sample-id "{params.s_rec.sample_id}" \
229-
--batch-id "{params.s_rec.date}" \
230228
--timeline-file "{input.timeline_file}" \
231-
--primer-file "{input.primers_file}" \
229+
--lapis-url "{params.lapis_url}" \
232230
--output-fp "{output.silo_input}" \
233-
--reference "{params.nextclade_reference}" \
234231
> {log.outfile} 2> >(tee {log.errfile} >&2)
235232
"""
236233

@@ -250,6 +247,9 @@ rule silo_upload:
250247
s_rec=get_s_rec,
251248
keycloak_token_url=config["loculus"]["keycloak_token_url"],
252249
submission_url=config["loculus"]["submission_url"],
250+
password=config["loculus"]["password"],
251+
username=config["loculus"]["username"],
252+
group_id=config["loculus"]["group_id"],
253253
SR2SILO=config["applications"]["sr2silo"],
254254
log:
255255
outfile="{dataset}/alignments/silo_upload.out.log",
@@ -265,11 +265,13 @@ rule silo_upload:
265265
threads: config["loculus"]["threads"]
266266
shell:
267267
"""
268-
{params.SR2SILO} submit-to-loculus \
268+
{params.SR2SILO} submit-to-loculus
269+
--processed-file "{input.silo_input}" \
269270
--keycloak-token-url "{params.keycloak_token_url}" \
270271
--submission-url "{params.submission_url}" \
271-
--processed-file "{input.silo_input}" \
272-
--sample-id "{params.s_rec.sample_id}" && \
272+
--group-id {params.group_id} \
273+
--username "{params.username}" \
274+
--password "{params.password}" && \
273275
mkdir -p $(dirname {output.flag}) && \
274276
touch {output.flag}
275277
"""

workflow/schemas/config_schema.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,12 +1957,6 @@
19571957
"type": "integer",
19581958
"default": 1
19591959
},
1960-
"nextclade_reference": {
1961-
"type": "string",
1962-
"default": "",
1963-
"description": "Name of the reference. Loculus uses the same names as nextclade datasets.",
1964-
"example": ["sars-cov-2"]
1965-
},
19661960
"local": {
19671961
"type": "boolean",
19681962
"default": true,
@@ -1972,15 +1966,37 @@
19721966
"keycloak_token_url": {
19731967
"type": "string",
19741968
"default": "",
1975-
"description": "Keycloak authentication URL to use during submission",
1969+
"description": "Loculus keycloak authentication URL to use during submission",
19761970
"example": ["https://auth.example.com/token"]
19771971
},
19781972
"submission_url": {
19791973
"type": "string",
19801974
"default": "",
19811975
"description": "Loculus submission URL to use during submission",
19821976
"example": ["https://backend.example.com/api"]
1983-
}
1977+
},
1978+
"lapis-url": {
1979+
"type": "string",
1980+
"default": "",
1981+
"description": "Lapis URL to for fetching the reference from LAPSI/SILO.",
1982+
"example": ["https://lapis.example.com"]
1983+
},
1984+
"group_id": {
1985+
"type": "integer",
1986+
"default": 0,
1987+
"description": "Group ID to use for submission, for authentication wiht Loculus",
1988+
"example": [123]
1989+
},
1990+
"username": {
1991+
"type": "string",
1992+
"default": "",
1993+
"description": "Username to use for authentication wiht Loculus.",
1994+
"example": ["your-username"]
1995+
},
1996+
"password": {
1997+
"type": "string",
1998+
"default": "",
1999+
"description": "Password to use for authentication wiht Loculus."
19842000
},
19852001
"default": {},
19862002
"type": "object"

0 commit comments

Comments
 (0)