-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlaping arrows #42
Comments
Hey, Other than that I enjoy the library! |
@ghutinet @FruityPerdix there may be a trick to do that I am not 100% sure I understand what the expected result is, do you have a screenshot/schema? |
This can be done by setting the record's from dna_features_viewer import GraphicFeature, GraphicRecord
import numpy as np
record = GraphicRecord(sequence_length=1000, features=[
GraphicFeature(
start=50 * i + np.random.randint(-20, 20),
end=50 * i + np.random.randint(30, 70),
strand= [-1, 1][i % 2],
color=["limegreen", "yellow", "cyan"][i % 3],
)
for i in range(20)
])
record.feature_level_height = 0 # <=====
ax, _ = record.plot(figure_width=10); |
I'm curious to know if there was ever a fix for this issue. I had to mess around with the label font size and labels_spacing settings to find a combination of values that resulted in all labels being attached to lines. |
This problem is a bit complicated and may need refactoring, but redefining the below function before plotting at least connects the boxes until a proper solution is implemented: def new_determine_annotation_height(levels):
return 1
record.determine_annotation_height = new_determine_annotation_height |
How about circular genomes? |
Great tool!
The only thing I couldn't figure is if you want all your gene arrows on the same line with overlapping arrows.
I didn't find any option that would allow me to do so. Is there any? If yes would it draw the tip of the arrow on top the next gene arrow or on the bottom?
Thank you
The text was updated successfully, but these errors were encountered: