wrong background colors of linked alignment

59 views
Skip to first unread message

Justine Pollet

unread,
Oct 6, 2021, 10:06:56 AM10/6/21
to The ETE toolkit
  Hi,

I don't understand why my nucleotide linked alignement appears in yellow , orange , grey and light grey instead of the default  colors in faces.py   https://github.com/etetoolkit/ete/blob/master/ete3/treeview/faces.py#L140 .

Thanks in advance

Justine

Justine Pollet

unread,
Oct 7, 2021, 5:56:11 AM10/7/21
to The ETE toolkit
I can see the right colors if i do : 

```
faces._ntbgcolors = {
    'A':'#A0A0FF',
    'G':'#FF7070',
    'I':'#80FFFF',
    'C':'#FF8C4B',
    'T':'#A0FFA0',
    'U':'#FF8080',
    '.':"#FFFFFF",
    '-':"#FFFFFF",
    ' ':"#FFFFFF",
    'N':"#FFFFFF"
}

igphyml_tree = PhyloTree(tree_path,
                         alignment="seq.fasta", 
                         alg_format="fasta" )


for leaf in igphyml_tree.traverse():

        leaf.add_face(SequenceFace(seq=leaf.sequence, bg_colors=faces._ntbgcolors),column=1 )

```

But the sequence is not aligned like with linked alignement and the both link alignement and manually add SequenceFace is in plot.
If i not adding manually SequenceFace whenever I had N keys like above or directly in  ete3/treeview/faces.py script the linked alignement output with wrong colors.
How can i have right background colors on my linked alignement ?

Thanks
Capture.PNG
Reply all
Reply to author
Forward
0 new messages