cocoatree.visualization.update_tree_ete3_and_return_style¶
- cocoatree.visualization.update_tree_ete3_and_return_style(tree_ete3, df_annot, sector_id, sector_seq, meta_data, fig_title='', t_sector_seq=True, t_sector_heatmap=True, colormap='inferno')[source]¶
Update ete3 tree with sector info and attributes and return tree_style for further visualization.
Arguments¶
- tree_ete3ete3’s tree object,
as imported by io.load_tree_ete3()
annot_file : pandas dataframe of the annotation file
- sector_idlist of sector identifiers, as imported by io.load_msa()
the ids must match with the tree’s leaves id
- sector_seqcorresponding list of sector sequences to display,
as imported by io.load_msa()
- meta_datatuple of annotations to display
(from annotation file’s header)
fig_title : figure title (str)
- t_sector_seqboolean,
whether to show the sequences of the sector
- t_sector_heatmapboolean,
whether to add a heatmap of the identity matrix between sector sequences
Returns¶
tree_style : TreeStyle class from ete3
Examples using cocoatree.visualization.update_tree_ete3_and_return_style
¶

Plot sector together with (phylogenetic) tree and metadata
Plot sector together with (phylogenetic) tree and metadata