Skip to content

Non-string type attributes on nodes #71

@Wytamma

Description

@Wytamma

I want to store non-string data on the nodes in a tree e.g. a matrix of numbers.

However, as the Node attributes are of type string | string[] I can't store the matrix (https://github.com/clockor2/phylojs/blob/main/src/tree/node.ts#L180). Would we be okay to change the type to include numbers or I can even see the utility of more complex datatypes.

You could then move the complexities of reading and writing these types of annotations to the custom user defined annotation readers/writers (https://github.com/clockor2/phylojs/blob/main/src/io/writers/newick.ts#L13).

Relates to #68 as we don't currently support user defined annotation parsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions