feature: Rotate all labels at once using annotation_rotation #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. Ifannotation_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!