rename-newick-leaf-labels

Description

rename-newick-leaf-labels adaptor renames the leaf labels from a newick-format file.

The newick data can either be pasted directly in as an input, or a file can be uploaded. To upload a newick file, use the import-text-from-file adaptor as the newick input.

Inputs

newick Type: text Required: Yes A tree in Newick format.

mapping Type: dictionary Required: Yes A mapping of existing labels (dictionary keys) with new labels (dictionary values).

Outputs

newick Type: text A tree with renamed labels in Newick format.

Examples

Example 1: Default behaviour.

Inputs:

newick:

(Bovine:0.69395,(Gibbon:0.0,(Orangutan:0.0,(Gorilla:0.0,(Chimp:0.0,Human:0.0)123:0.0)test:0.06124):0.0):0.54939,Mouse:1.21460);

mapping:

KEYVALUE

Mouse

Mice

Gorilla

Silverback

Outputs:

newick:

(Bovine:0.69395,(Gibbon:0.0,(Orangutan:0.0,(Silverback:0.0,(Chimp:0.0,Human:0.0)123:0.0)test:0.06124):0.0):0.54939,Mice:1.21460);

-> Renamed the leaf labels Mouse and Gorilla as Mice and Silverback respectively.

Use Cases

  • Provide more descriptive leaf labels prior to visualising the tree in Microreact.

  • Rename labels to match information in a metadata file.

Last updated