graphlan
graphlan copied to clipboard
feature: Rotate all labels at once using annotation_rotation
Hi,
Thanks a lot for this amazing software, I have found it very useful! I was using GraPhlAn and wanted a way to rotate all labels at once, and avoid editing clade by clade in the annotation file, so this was my way to do it.
I am biologist and I have not formal formation in programming, and I don't understand completely the working of GraPhlAn, so I apologize in advance if there are issues with this code. However, I have tested it in some cases (not a thorough testing) and it worked without problems.
The main idea is to be able to rotate 90° all labels by setting annotation_rotation 90
in the annotation file. If annotation_rotation
is set in a clade, it overrides the global option. annotation_rotation
still have two possible values: 0 and 90.
Here is an example annotation file showing how the new feature would be used. I also provide the corresponding input tree for graphlan_annotate.py
. The output should be:
Hope you find it useful and if not implementable maybe can help to shed some light in the implementation of this feature. Thanks!