-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |