Skip to content

Chain.load_from_string() sometimes doesn't load in the for loop #8

@m-abyzov

Description

@m-abyzov

I have next code:

 for sequence_alignment in sequences:
    chain = Chain.load_from_string(sequence=sequence_alignment)
    cdrs = dict()
    try:
      for cdr_name, cdr_indexes in chain.cdr[0].items():
        cdrs[cdr_name] = sequence_alignment[cdr_indexes[0]:(cdr_indexes[-1] + 1)]
    except Exception as error:
         time.sleep(0.1)
         if chain.cdr == None:
            print("ERROR::", error)

And sometimes it prints error, which indicates that cdrs not loaded, But I called the load function! Seems some concurrency issues in your lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions