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

Feature: Add "use_breach_form" field in "constraints_breaches_dataframe" #56

Open
andrewshvv opened this issue Apr 9, 2021 · 3 comments

Comments

@andrewshvv
Copy link

Scenario:
I would like to use constraints_breaches_dataframe for generating my own report and upload SeqRecord in Benchling instead of the .pdf.

Problem:
For our customers, we need a bit more general description of why their sequence doesn't pass the constraints, and currently, I need to copy/paste the whole function instead of re-using it with the use_breach_form=False field.

@Zulko
Copy link
Member

Zulko commented Apr 9, 2021

Sorry I didn't get what use_breach_form means, could you give an example of the ideal code you'd write and what it would do?

@andrewshvv
Copy link
Author

andrewshvv commented Apr 10, 2021

Let me describe it in a bit more general form:

As a User of dna-chisel I want to define my own description of constraint and be able to use constraints_breaches_dataframe function with this longer version of the description, instead of the breach_label description. So that I could use the annotated records and upload them in Benchling for further inspection and correction.

Currently, I have achieved that by inheriting from the constraints class and redefining breach_label function, which takes my description.

Initially, I thought it would be good to pass the use_breach_form in the constraints_breaches_dataframe function. But I believe defining the general high-level description will give you space for implementing it in a way you feel appropriate.

def constraints_breaches_dataframe(
    constraints, sequences, display_constraints_locations=False,
):
 
.........

    dataframe_records = [
        dict(
            [("sequence", name)]
            + [
                (
                    constraint.label(
                        use_breach_form=True, <======== HERE
                        with_location=display_constraints_locations,
                    ),

@andrewshvv
Copy link
Author

An example of what I have achieved with longer description:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants