Skip to content

feature: bridge to SILO – adding transform_upload_to_SILO#177

Draft
gordonkoehn wants to merge 7 commits intorubiconfrom
65-sr2silo-integration-into-v-pipe-workflow
Draft

feature: bridge to SILO – adding transform_upload_to_SILO#177
gordonkoehn wants to merge 7 commits intorubiconfrom
65-sr2silo-integration-into-v-pipe-workflow

Conversation

@gordonkoehn
Copy link
Contributor

@gordonkoehn gordonkoehn commented Apr 25, 2025

This PR aims to integrate a rule at the end of V-Pipe's workflow to execute sr2silo for the upload of DNA alignments, enriched with amino acid alignments to SILO.

The snakemake rule that is meant as a guiding layout is here.

@gordonkoehn gordonkoehn requested a review from Copilot April 25, 2025 11:30
@gordonkoehn gordonkoehn self-assigned this Apr 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR integrates a new rule into V-Pipe's workflow for executing sr2silo to process DNA and amino acid alignments before their upload to SILO.

  • Added a new environment file (workflow/envs/sr2silo.yaml) specifying the channels and dependency (sr2silo version 0.0.4).
Files not reviewed (1)
  • workflow/rules/publish.smk: Language not supported
@gordonkoehn
Copy link
Contributor Author

@DrYak would you have suggestions to where I can find the wildcards I need? I had a look though common.smk yet that is taking longer to understand than I though. I am looking for:

  • sample_id
  • batch_id
  • virus / or reference name / i.e. the folder name sars-cov-2 in resources
  • primer_file
  • timeline_file

I need all of these files only to generate the metadata.

@github-actions
Copy link

github-actions bot commented Jun 27, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shellcheck 13 0 0 1.09s
✅ DOCKERFILE hadolint 1 0 0 0.34s
✅ JUPYTER jupyfmt 12 9 0 0 8.72s
✅ MARKDOWN markdownlint 17 3 0 0 2.17s
✅ PERL perlcritic 1 0 0 1.68s
✅ PYTHON black 53 1 0 0 2.6s
✅ SNAKEMAKE snakefmt 25 1 0 0 12.0s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@DrYak DrYak force-pushed the 65-sr2silo-integration-into-v-pipe-workflow branch from 5b3cb85 to 777ce7e Compare June 27, 2025 14:56
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrYak you seem to have deleted this file here - was this intended ? See commit 777ce7e

Copy link
Contributor Author

@gordonkoehn gordonkoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the changes to work with the new sr2silo v1.1.0 where I re-worked the interface. Now authentication and metadata are handled much, much better.

See bioconda PR here:

And the working example snakemake workflows here:

Comment on lines +250 to +252
password=config["loculus"]["password"],
username=config["loculus"]["username"],
group_id=config["loculus"]["group_id"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this is the authentication that we need to submit to Loculus.

They can also be set as environmental variables, so that they don't show up in snakemake logs.

Named: GROUP_ID, USERNAME, PASSWORD

I am not sure how this is best done here in Snakmake and VPipe.

Comment on lines +268 to +274
{params.SR2SILO} submit-to-loculus
--processed-file "{input.silo_input}" \
--keycloak-token-url "{params.keycloak_token_url}" \
--submission-url "{params.submission_url}" \
--group-id {params.group_id} \
--username "{params.username}" \
--password "{params.password}" && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note also no more batch_id here

Comment on lines +1966 to +1996
"keycloak_token_url": {
"type": "string",
"default": "",
"description": "Loculus keycloak authentication URL to use during submission",
"example": ["https://auth.example.com/token"]
},
"submission_url": {
"type": "string",
"default": "",
"description": "Loculus submission URL to use during submission",
"example": ["https://backend.example.com/api"]
},
"lapis-url": {
"type": "string",
"default": "",
"description": "Lapis URL to for fetching the reference from LAPSI/SILO.",
"example": ["https://lapis.example.com"]
},
"group_id": {
"type": "integer",
"default": 0,
"description": "Group ID to use for submission, for authentication wiht Loculus",
"example": [123]
},
"username": {
"type": "string",
"default": "",
"description": "Username to use for authentication wiht Loculus.",
"example": ["your-username"]
},
"password": {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the parameters to the docs.

@gordonkoehn
Copy link
Contributor Author

@DrYak, let's implement this together. I am not sure how I can test this.

@gordonkoehn gordonkoehn force-pushed the 65-sr2silo-integration-into-v-pipe-workflow branch 2 times, most recently from 5973f2a to 74fbe99 Compare July 23, 2025 13:27
@gordonkoehn gordonkoehn force-pushed the 65-sr2silo-integration-into-v-pipe-workflow branch from fb4c59b to 0345bda Compare July 23, 2025 13:49
@DrYak DrYak force-pushed the rubicon branch 2 times, most recently from db1530b to 934e088 Compare September 25, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants