Skip to content

Suggestions for improving functionality of Calculating Complexity Score of DNA sequences. #334

Description

@GeneCodeSavvy

1. To provide actionable feedback to users, the implementation will capture and expose detailed error information from the vendor's API.

Implementation Details:

  1. Stateful Error Tracking: The BaseAccountAccessor class will be made stateful to store diagnostic information. An instance variable, self.sequence_issues, will be initialized as an empty dictionary: {}.

  2. Populating Issues During Scoring: During the execution of get_sequence_complexity, after polling is complete, if any sequence returns a non-empty issues array, this data will be captured. The self.sequence_issues dictionary will be populated by mapping the sbol3.Sequence object to the list of issue objects returned by the API.

    # Example of populating the dictionary within get_sequence_complexity
    for construct in scored_constructs:
        sbol_sequence = self.id_to_sequence_map[construct['id']]
        if construct['score_data']['issues']:
            self.sequence_issues[sbol_sequence] = construct['score_data']['issues']
            # Also log this information immediately
            logging.warning(f"Sequence {sbol_sequence.display_id} failed scoring with issues: {construct['score_data']['issues']}")
  3. Public Accessor Method: A new public method, get_sequence_issues(), will be added to the BaseAccountAccessor class. This method will simply return the self.sequence_issues dictionary, allowing programmatic access to the specific reasons for synthesis failure after a scoring run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions