Auspice not working on custom JSON created using specified schema

I created a custom JSON file for auspice with all required attributes specified in schema(here). But whenever I used it on https://auspice.us/, it produces a blank white screen.
Here is my JSON file:

{
  "meta": {
    "updated": "test",
    "panels": [
      "tree"
    ]
  },
  "tree": {
    "children": [
      {
        "name": "8",
        "children": [
          {
            "name": "0",
            "children": []
          },
          {
            "name": "7",
            "children": [
              {
                "name": "4",
                "children": []
              },
              {
                "name": "6",
                "children": [
                  {
                    "name": "2",
                    "children": []
                  },
                  {
                    "name": "5",
                    "children": [
                      {
                        "name": "1",
                        "children": []
                      },
                      {
                        "name": "3",
                        "children": []
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "name": "Root"
  },
  "version": "v2"
}

Here is the error I’m getting in the console:

Hi @Sourabh7211. There’s two issues I see here that are required for even a minimal tree to work:

  1. This tree contains no branch lengths or dates, so there’s no range to display on the x-axis. Try adding a div (divergence) key in the node_attrs object of each node. See the schema for details on the div attribute and other attributes you can use.

  2. According to the schema, the children array is supposed to contain at least one element. If there are no children, then the key should be omitted entirely instead of existing as an empty array.

I modified a copy of your tree following the above and it displays in Auspice for me:

1 Like

Thanks a lot, @trs. I was able to use auspice for our custom data.
However, I was wondering how nexstrain assigns metadata to non-leaf nodes. For leaf nodes, we get metadata from gisaid, but what about non-leaf nodes?
I think due to this, our plots are coming without branches(like attached figure).

Internal nodes get metadata that’s computed by the various augur commands, like augur refine (for a time tree), augur traits (for various metadata fields), and others. These commands output node data files (see Data Formats) which are then combined together by augur export for use with Auspice.

1 Like