oxpig / ANARCI

Antibody Numbering and Antigen Receptor ClassIfication
BSD 3-Clause "New" or "Revised" License
161 stars 84 forks source link

TypeError: 'NoneType' object is not subscriptable #82

Open ywilke opened 4 months ago

ywilke commented 4 months ago

I am trying to run ANARCI on large number of sequences and I am getting the following error. I cannot narrow it down to which sequence is causing the error.

  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-298aff8b-ef33-42af-99ab-0bfccbc42e7c/lib/python3.9/site-packages/anarci/anarci.py", line 941, in run_anarci
    csv_output(sequences, numbered, alignment_details, outfile)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-298aff8b-ef33-42af-99ab-0bfccbc42e7c/lib/python3.9/site-packages/anarci/anarci.py", line 287, in csv_output
    details[i][j].get('germlines',{}).get( 'j_gene',[['',''],0] )[0][1],
TypeError: 'NoneType' object is not subscriptable

It seems a None snuck into the j_gene value. The csv_output function can't handle a None.