Skip to content

Commit

Permalink
Add options fig code in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
emunozdc authored and emunozdc committed Jun 20, 2024
1 parent a0dbf10 commit cfe22e4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions examples/options_fig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import pyranges as pr
import pyranges_plot as prp

prp.set_engine("plt")
prp.set_id_col("transcript_id")

p = pr.PyRanges(
{
"Chromosome": ["1"] * 9,
"Strand": ["+", "+", "-", "-", "-", "+", "+", "+", "-"],
"Start": [i * 100 for i in [5, 35, 3, 13, 35, 45, 49, 56, 60]],
"End": [i * 100 for i in [15, 37, 6, 17, 39, 47, 51, 57, 67]],
"transcript_id": ["t1", "t1", "t2", "t2", "t2", "t3", "t3", "t3", "t4"],
}
)

prp.plot(
p,
colormap="Alphabet",
arrow_size=0.03,
shrink=True,
shrink_threshold=500,
text=True,
text_pad=100,
title_size=25,
exon_border="black",
text_size=15,
)

0 comments on commit cfe22e4

Please sign in to comment.