Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow boolean variables in sheet templates #1757

Closed
sellth opened this issue Aug 22, 2023 · 4 comments
Closed

Allow boolean variables in sheet templates #1757

sellth opened this issue Aug 22, 2023 · 4 comments
Labels
app: samplesheets Issue in the samplesheets app feature Requested feature or enhancement
Milestone

Comments

@sellth
Copy link
Contributor

sellth commented Aug 22, 2023

Problem

Cookiecutter v2.2+ allows for boolean-type variables. SODAR does currently not recognise those as valid form fields and omits them in the "Create from template" dialogue.

Solution

Boolean variables should be parsed and treated as multiple choice for simplicity.

Additional Context

@sellth sellth added the feature Requested feature or enhancement label Aug 22, 2023
@mikkonie mikkonie added the app: samplesheets Issue in the samplesheets app label Aug 23, 2023
@mikkonie mikkonie added this to the v0.14.0 milestone Aug 23, 2023
@mikkonie
Copy link
Contributor

mikkonie commented Aug 23, 2023

I have a work branch up with this change and a dependency to the pr commit, it seems to work just fine. See the commit mentioned above.

Let me know when this is merged and I will update the dependency and merge this into dev.

@mikkonie
Copy link
Contributor

Note to self: this initial implementation apparently will not work with the tumor_normal_dna and tumor_normal_triplets templates, as they require the hack in save() which I just removed:

if 'is_triplet' in self.sheet_tpl.configuration:
    extra_context['is_triplet'] = self.sheet_tpl.configuration[
        'is_triplet'
    ]

However, with the cancer template (which actually has is_triplet as a boolean variable), this can not be used. Either we have to 1) fix the other templates to not require this hack, or 2) limit the hack only to be used with specific templates. I'd of course be in favour of the former approach, if feasible.

@sellth
Copy link
Contributor Author

sellth commented Aug 28, 2023

FYI we're still discussing changes to the new somatic template relying on this feature. Expectation is that it'll take another week or two as there is not much pressure. The final merge will however also remove tumor_normal_dna and tumor_normal_triplets.

@mikkonie
Copy link
Contributor

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: samplesheets Issue in the samplesheets app feature Requested feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants