Open andrewshvv opened 3 years ago
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?
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 useconstraints_breaches_dataframe
function with this longer version of the description, instead of thebreach_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,
),
An example of what I have achieved with longer description:
Scenario: I would like to use
constraints_breaches_dataframe
for generating my own report and uploadSeqRecord
inBenchling
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.