phac-nml / biohansel

Rapidly subtype microbial genomes using single-nucleotide variant (SNV) subtyping schemes
Apache License 2.0
25 stars 7 forks source link

Revert "NA subtype default output" #79

Closed peterk87 closed 5 years ago

peterk87 commented 5 years ago

I think it should be kept as None or the equivalent Pandas NA/NaN value when transformed to a DataFrame.

If the issue is with outputting "NA" instead of an empty string in the report output files under the subtype field, then the null/None values can be changed to "NA" in the report DataFrame before being output to a file (https://github.com/phac-nml/biohansel/blob/development/bio_hansel/main.py#L226). See Pandas functions fillna and isnull (e.g. df['subtype'][pd.isnull(df['subtype'])] = 'NA' # or whatever Excel's NA value is (#N/A).

Reverts phac-nml/biohansel#78