Closed acpguedes closed 6 years ago
UPDATE:
add font size and color to motif name
Anyway didn't work
for i in t.get_leaf_names():
motifs=dom[dom.ID == i][['start', 'end', 'shape', 'w', 'h', 'fg', 'bg', 'domain']].values.tolist()
seq=str(f[i].seq)
_ = []
motifs2 = list()
for m in motifs:
_ = "arial|8|white|" + m[7]
motifs2.append(m[0:7] +[_])
print(motifs2)
seqface = SeqMotifFace(seq, motifs=motifs2)
(t & i).add_face(seqface, 0, 'aligned')
is it solved? otherwise leave the issue open so we can track all bugs for next code sprints...
I'm trying to draw a tree with SeqMotifFace to set build domains as face of each leaf.
Since I'm using Pandas, I have a dataframe like this:
I also have a tree for theses sequences.
So, I'm using a for loop to set the face of the sequences this way
The print above turns:
Exactly as required for motifs.
No error is returned in this loop, but...
When I try something like t.render("%%inline") or t.show I get this error
The tree is okay, if I just load the tree and try render or show it's been drawn nicely.I just got the error after insert motif face.