AbPyTools icon indicating copy to clipboard operation
AbPyTools copied to clipboard

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

Open m-abyzov opened this issue 6 years ago • 0 comments

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.

m-abyzov avatar May 22 '19 20:05 m-abyzov