Skip to content

Commit c9876c2

Browse files
authored
fix na bug (#158)
* fix na bug * remove new default
1 parent 8b08f90 commit c9876c2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyard/data_repository.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ def generate_mac_codes(db_connection: sqlite3.Connection, refresh_mac: bool):
402402
# Load the MAC file to a DataFrame
403403
mac_url = 'https://hml.nmdp.org/mac/files/numer.v3.zip'
404404
df_mac = pd.read_csv(mac_url, sep='\t', compression='zip',
405-
skiprows=3, names=['Code', 'Alleles'])
405+
skiprows=3, names=['Code', 'Alleles'],
406+
keep_default_na=False)
406407
# Create a dict from code to alleles
407408
mac = df_mac.set_index("Code")["Alleles"].to_dict()
408409
# Save the mac dict to db

tests/features/mac.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Feature: MAC (Multiple Allele Code)
2323
| A*01:AC+A*01:AB | G | A*01:01:01G/A*01:02+A*01:01:01G/A*01:03:01G |
2424
| A*01:01+A*01:AB | G | A*01:01:01G+A*01:01:01G/A*01:02 |
2525
| C*05:APUF | lg | X |
26+
| DRB1*13:NA | lgx | DRB1*13:01/DRB1*13:02/DRB1*13:06/DRB1*13:08/DRB1*13:09/DRB1*13:10 |

0 commit comments

Comments
 (0)