Skip to content

Commit

Permalink
fixed non-visited keys of the info field
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-fuchs committed Nov 12, 2024
1 parent 63f0dee commit 19054db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions virheat/scripts/data_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ def read_vcf(vcf_file, reference):
val_list = val.split(',')
for value in val_list:
vcf_dict[key].append(convert_string(value))
visited_keys.append(key)
# append none for ech none visited key
visited_keys.append(key)
# append none for each none visited key in the INFO field
for key in [k for k in vcf_dict.keys() if k not in visited_keys]:
vcf_dict[key].append(None)
vcf_dict[key].extend([None]*length_variants)

return vcf_dict

Expand Down

0 comments on commit 19054db

Please sign in to comment.