cellannotation / cas-tools

Cell Annotation Schema Tools
1 stars 0 forks source link

Empty columns in add_author_annotations #96

Closed hkir-dev closed 3 months ago

hkir-dev commented 3 months ago

add_author_annotations cannot properly handle empty column values. It is setting empty value as NaN which is not a valid json value. Should set null instead:

    {
      "labelset": "cluster",
      "cell_label": "Bcell_0",
      "cell_set_accession": "CS202210140_1",
      "parent_cell_set_accession": "CS202210140_463",
      "author_annotation_fields": {
        "Class auto-annotation": "BCELL",
        "Neurotransmitter auto-annotation": NaN,
        "Neuropeptide auto-annotation": NaN,
        "Subtype auto-annotation": NaN,
        "Transferred MTG Label": NaN,
        "Top three regions": "Midbrain: 21.0%, Basal forebrain: 19.0%, Pons: 14.3%",
        "Top three dissections": "Human GPi: 11.4%, Human SN: 11.4%, Human SN-RN: 4.8%",
        "Top Enriched Genes": "IGHM, MS4A1, FCRL1, AC244205.1, IGLL5, IGHA1, BLK, IGLC3, IGLC2, IKZF3",
        "Number of cells": 105.0,
        "DoubletFinder score": 0.013358007,
        "Total UMI": 2258.866667,
        "Fraction unspliced": 0.608112879,
        "Fraction mitochondrial": 0.020988592,
        "H19.30.002": 58.0,
        "H19.30.001": 20.0,
        "H18.30.002": 27.0,
        "H18.30.001": 0.0,
        "Fraction cells from top donor": 0.552380952,
        "Number of donors": 3.0
      }
    },