{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 02: Expression plot\n",
"\n",
"Create an RNA isoform structure plot with an RNA isoform expression plot beside it"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import RNApysoforms as RNApy"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"## Path to your ENSEMBL GTF file and counts matrix file\n",
"ensembl_gtf_path = \"../dash_apps/RNApysoforms/tests/test_data/Homo_sapiens_chr21_and_Y.GRCh38.110.gtf\"\n",
"counts_matrix_path = \"../dash_apps/RNApysoforms/tests/test_data/counts_matrix_chr21_and_Y.tsv\""
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"## Read ENSEMBL gtf and counts matrix\n",
"annotation = RNApy.read_ensembl_gtf(ensembl_gtf_path)\n",
"counts_matrix = RNApy.read_expression_matrix(expression_matrix_path=counts_matrix_path)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"
shape: (5, 4)| transcript_id | gene_id | sample_id | counts |
|---|
| str | str | str | f64 |
| "ENST00000476106" | "ENSG00000142168" | "sample_1" | 0.0 |
| "ENST00000476106" | "ENSG00000142168" | "sample_4" | 0.0 |
| "ENST00000476106" | "ENSG00000142168" | "sample_7" | 0.0 |
| "ENST00000476106" | "ENSG00000142168" | "sample_2" | 0.0 |
| "ENST00000476106" | "ENSG00000142168" | "sample_6" | 0.0 |
"
],
"text/plain": [
"shape: (5, 4)\n",
"┌─────────────────┬─────────────────┬───────────┬────────┐\n",
"│ transcript_id ┆ gene_id ┆ sample_id ┆ counts │\n",
"│ --- ┆ --- ┆ --- ┆ --- │\n",
"│ str ┆ str ┆ str ┆ f64 │\n",
"╞═════════════════╪═════════════════╪═══════════╪════════╡\n",
"│ ENST00000476106 ┆ ENSG00000142168 ┆ sample_1 ┆ 0.0 │\n",
"│ ENST00000476106 ┆ ENSG00000142168 ┆ sample_4 ┆ 0.0 │\n",
"│ ENST00000476106 ┆ ENSG00000142168 ┆ sample_7 ┆ 0.0 │\n",
"│ ENST00000476106 ┆ ENSG00000142168 ┆ sample_2 ┆ 0.0 │\n",
"│ ENST00000476106 ┆ ENSG00000142168 ┆ sample_6 ┆ 0.0 │\n",
"└─────────────────┴─────────────────┴───────────┴────────┘"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"## Filter gene name in annotation and counts matrix.\n",
"sod1_annotation, sod1_counts_matrix = RNApy.gene_filtering(annotation=annotation, expression_matrix=counts_matrix, target_gene=\"SOD1\")\n",
"\n",
"sod1_counts_matrix.head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"
shape: (5, 13)| gene_id | gene_name | transcript_id | transcript_name | transcript_biotype | seqnames | strand | type | start | end | exon_number | rescaled_start | rescaled_end |
|---|
| str | str | str | str | str | str | str | str | i64 | i64 | i64 | i64 | i64 |
| "ENSG00000142168" | "SOD1" | "ENST00000270142" | "SOD1-201" | "protein_coding" | "21" | "+" | "exon" | 31659693 | 31659841 | 1 | 29 | 177 |
| "ENSG00000142168" | "SOD1" | "ENST00000270142" | "SOD1-201" | "protein_coding" | "21" | "+" | "CDS" | 31659770 | 31659841 | 1 | 106 | 177 |
| "ENSG00000142168" | "SOD1" | "ENST00000270142" | "SOD1-201" | "protein_coding" | "21" | "+" | "intron" | 31659841 | 31663790 | 1 | 177 | 1431 |
| "ENSG00000142168" | "SOD1" | "ENST00000270142" | "SOD1-201" | "protein_coding" | "21" | "+" | "CDS" | 31663790 | 31663886 | 2 | 1431 | 1527 |
| "ENSG00000142168" | "SOD1" | "ENST00000270142" | "SOD1-201" | "protein_coding" | "21" | "+" | "exon" | 31663790 | 31663886 | 2 | 1431 | 1527 |
"
],
"text/plain": [
"shape: (5, 13)\n",
"┌───────────┬───────────┬───────────┬───────────┬───┬──────────┬───────────┬───────────┬───────────┐\n",
"│ gene_id ┆ gene_name ┆ transcrip ┆ transcrip ┆ … ┆ end ┆ exon_numb ┆ rescaled_ ┆ rescaled_ │\n",
"│ --- ┆ --- ┆ t_id ┆ t_name ┆ ┆ --- ┆ er ┆ start ┆ end │\n",
"│ str ┆ str ┆ --- ┆ --- ┆ ┆ i64 ┆ --- ┆ --- ┆ --- │\n",
"│ ┆ ┆ str ┆ str ┆ ┆ ┆ i64 ┆ i64 ┆ i64 │\n",
"╞═══════════╪═══════════╪═══════════╪═══════════╪═══╪══════════╪═══════════╪═══════════╪═══════════╡\n",
"│ ENSG00000 ┆ SOD1 ┆ ENST00000 ┆ SOD1-201 ┆ … ┆ 31659841 ┆ 1 ┆ 29 ┆ 177 │\n",
"│ 142168 ┆ ┆ 270142 ┆ ┆ ┆ ┆ ┆ ┆ │\n",
"│ ENSG00000 ┆ SOD1 ┆ ENST00000 ┆ SOD1-201 ┆ … ┆ 31659841 ┆ 1 ┆ 106 ┆ 177 │\n",
"│ 142168 ┆ ┆ 270142 ┆ ┆ ┆ ┆ ┆ ┆ │\n",
"│ ENSG00000 ┆ SOD1 ┆ ENST00000 ┆ SOD1-201 ┆ … ┆ 31663790 ┆ 1 ┆ 177 ┆ 1431 │\n",
"│ 142168 ┆ ┆ 270142 ┆ ┆ ┆ ┆ ┆ ┆ │\n",
"│ ENSG00000 ┆ SOD1 ┆ ENST00000 ┆ SOD1-201 ┆ … ┆ 31663886 ┆ 2 ┆ 1431 ┆ 1527 │\n",
"│ 142168 ┆ ┆ 270142 ┆ ┆ ┆ ┆ ┆ ┆ │\n",
"│ ENSG00000 ┆ SOD1 ┆ ENST00000 ┆ SOD1-201 ┆ … ┆ 31663886 ┆ 2 ┆ 1431 ┆ 1527 │\n",
"│ 142168 ┆ ┆ 270142 ┆ ┆ ┆ ┆ ┆ ┆ │\n",
"└───────────┴───────────┴───────────┴───────────┴───┴──────────┴───────────┴───────────┴───────────┘"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\"\"\"\n",
"Rescale introns (no need to run function \"to_intron\", shorten_gaps() already does this \n",
"by default if introns aren't already included in annotation.\n",
"\"\"\"\n",
"sod1_annotation = RNApy.shorten_gaps(sod1_annotation)\n",
"\n",
"sod1_annotation.head()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: exon
Feature Number: 1
Chromosome: 21
Start: 31659693
End: 31659841
Size: 148
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": "Transcript Structure Hue"
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": true,
"type": "scatter",
"x": [
29,
177,
177,
29,
29
],
"xaxis": "x",
"y": [
-0.15,
-0.15,
0.15,
0.15,
-0.15
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: exon
Feature Number: 2
Chromosome: 21
Start: 31661549
End: 31661734
Size: 185
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1145,
1330,
1330,
1145,
1145
],
"xaxis": "x",
"y": [
-0.15,
-0.15,
0.15,
0.15,
-0.15
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: exon
Feature Number: 3
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
-0.15,
-0.15,
0.15,
0.15,
-0.15
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: exon
Feature Number: 4
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
-0.15,
-0.15,
0.15,
0.15,
-0.15
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: exon
Feature Number: 5
Chromosome: 21
Start: 31667258
End: 31667341
Size: 83
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1881,
1881,
1798,
1798
],
"xaxis": "x",
"y": [
-0.15,
-0.15,
0.15,
0.15,
-0.15
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: exon
Feature Number: 1
Chromosome: 21
Start: 31659709
End: 31660708
Size: 999
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
45,
1044,
1044,
45,
45
],
"xaxis": "x",
"y": [
0.85,
0.85,
1.15,
1.15,
0.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: exon
Feature Number: 2
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
0.85,
0.85,
1.15,
1.15,
0.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: exon
Feature Number: 3
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
0.85,
0.85,
1.15,
1.15,
0.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: exon
Feature Number: 4
Chromosome: 21
Start: 31667258
End: 31667375
Size: 117
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1915,
1915,
1798,
1798
],
"xaxis": "x",
"y": [
0.85,
0.85,
1.15,
1.15,
0.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#636EFA",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: exon
Feature Number: 5
Chromosome: 21
Start: 31668471
End: 31668931
Size: 460
",
"legendgroup": "protein_coding_CDS_not_defined",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding_CDS_not_defined",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
2016,
2476,
2476,
2016,
2016
],
"xaxis": "x",
"y": [
0.85,
0.85,
1.15,
1.15,
0.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: exon
Feature Number: 1
Chromosome: 21
Start: 31659666
End: 31659784
Size: 118
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": true,
"type": "scatter",
"x": [
2,
120,
120,
2,
2
],
"xaxis": "x",
"y": [
1.85,
1.85,
2.15,
2.15,
1.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: exon
Feature Number: 2
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
1.85,
1.85,
2.15,
2.15,
1.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: exon
Feature Number: 3
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
1.85,
1.85,
2.15,
2.15,
1.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: exon
Feature Number: 4
Chromosome: 21
Start: 31667258
End: 31667375
Size: 117
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1915,
1915,
1798,
1798
],
"xaxis": "x",
"y": [
1.85,
1.85,
2.15,
2.15,
1.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: exon
Feature Number: 5
Chromosome: 21
Start: 31668471
End: 31668931
Size: 460
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
2016,
2476,
2476,
2016,
2016
],
"xaxis": "x",
"y": [
1.85,
1.85,
2.15,
2.15,
1.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: exon
Feature Number: 1
Chromosome: 21
Start: 31659693
End: 31659841
Size: 148
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
29,
177,
177,
29,
29
],
"xaxis": "x",
"y": [
2.85,
2.85,
3.15,
3.15,
2.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: exon
Feature Number: 2
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
2.85,
2.85,
3.15,
3.15,
2.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: exon
Feature Number: 3
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
2.85,
2.85,
3.15,
3.15,
2.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: exon
Feature Number: 4
Chromosome: 21
Start: 31667258
End: 31667375
Size: 117
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1915,
1915,
1798,
1798
],
"xaxis": "x",
"y": [
2.85,
2.85,
3.15,
3.15,
2.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: exon
Feature Number: 5
Chromosome: 21
Start: 31668471
End: 31668931
Size: 460
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
2016,
2476,
2476,
2016,
2016
],
"xaxis": "x",
"y": [
2.85,
2.85,
3.15,
3.15,
2.85
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: CDS
Feature Number: 1
Chromosome: 21
Start: 31659770
End: 31659784
Size: 14
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
106,
120,
120,
106,
106
],
"xaxis": "x",
"y": [
1.75,
1.75,
2.25,
2.25,
1.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: CDS
Feature Number: 2
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
1.75,
1.75,
2.25,
2.25,
1.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: CDS
Feature Number: 3
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
1.75,
1.75,
2.25,
2.25,
1.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: CDS
Feature Number: 4
Chromosome: 21
Start: 31667258
End: 31667375
Size: 117
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1915,
1915,
1798,
1798
],
"xaxis": "x",
"y": [
1.75,
1.75,
2.25,
2.25,
1.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: CDS
Feature Number: 5
Chromosome: 21
Start: 31668471
End: 31668575
Size: 104
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
2016,
2120,
2120,
2016,
2016
],
"xaxis": "x",
"y": [
1.75,
1.75,
2.25,
2.25,
1.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: CDS
Feature Number: 1
Chromosome: 21
Start: 31659770
End: 31659841
Size: 71
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
106,
177,
177,
106,
106
],
"xaxis": "x",
"y": [
2.75,
2.75,
3.25,
3.25,
2.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: CDS
Feature Number: 2
Chromosome: 21
Start: 31663790
End: 31663886
Size: 96
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1431,
1527,
1527,
1431,
1431
],
"xaxis": "x",
"y": [
2.75,
2.75,
3.25,
3.25,
2.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: CDS
Feature Number: 3
Chromosome: 21
Start: 31666449
End: 31666518
Size: 69
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1628,
1697,
1697,
1628,
1628
],
"xaxis": "x",
"y": [
2.75,
2.75,
3.25,
3.25,
2.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: CDS
Feature Number: 4
Chromosome: 21
Start: 31667258
End: 31667375
Size: 117
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1798,
1915,
1915,
1798,
1798
],
"xaxis": "x",
"y": [
2.75,
2.75,
3.25,
3.25,
2.75
],
"yaxis": "y"
},
{
"fill": "toself",
"fillcolor": "#EF553B",
"hoverlabel": {
"namelength": -1
},
"hoveron": "fills+points",
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: CDS
Feature Number: 5
Chromosome: 21
Start: 31668471
End: 31668575
Size: 104
",
"legendgroup": "protein_coding",
"legendgrouptitle": {
"text": ""
},
"line": {
"color": "black",
"width": 0.25
},
"marker": {
"opacity": 0
},
"mode": "lines+markers",
"name": "protein_coding",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
2016,
2120,
2120,
2016,
2016
],
"xaxis": "x",
"y": [
2.75,
2.75,
3.25,
3.25,
2.75
],
"yaxis": "y"
},
{
"hoverinfo": "skip",
"marker": {
"color": "black",
"size": 10,
"symbol": "arrow-right"
},
"mode": "markers",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
799.2857142857142
],
"xaxis": "x",
"y": [
0
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: intron
Feature Number: 1
Chromosome: 21
Start: 31659841
End: 31661549
Size: 1708
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
177,
1145
],
"xaxis": "x",
"y": [
0,
0
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: intron
Feature Number: 2
Chromosome: 21
Start: 31661734
End: 31663790
Size: 2056
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1330,
1431
],
"xaxis": "x",
"y": [
0,
0
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: intron
Feature Number: 3
Chromosome: 21
Start: 31663886
End: 31666449
Size: 2563
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1527,
1628
],
"xaxis": "x",
"y": [
0,
0
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000476106
Feature Type: intron
Feature Number: 4
Chromosome: 21
Start: 31666518
End: 31667258
Size: 740
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1697,
1798
],
"xaxis": "x",
"y": [
0,
0
],
"yaxis": "y"
},
{
"hoverinfo": "skip",
"marker": {
"color": "black",
"size": 10,
"symbol": "arrow-right"
},
"mode": "markers",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1292.7857142857142
],
"xaxis": "x",
"y": [
1
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: intron
Feature Number: 1
Chromosome: 21
Start: 31660708
End: 31663790
Size: 3082
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1044,
1431
],
"xaxis": "x",
"y": [
1,
1
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: intron
Feature Number: 2
Chromosome: 21
Start: 31663886
End: 31666449
Size: 2563
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1527,
1628
],
"xaxis": "x",
"y": [
1,
1
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: intron
Feature Number: 3
Chromosome: 21
Start: 31666518
End: 31667258
Size: 740
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1697,
1798
],
"xaxis": "x",
"y": [
1,
1
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000470944
Feature Type: intron
Feature Number: 4
Chromosome: 21
Start: 31667375
End: 31668471
Size: 1096
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1915,
2016
],
"xaxis": "x",
"y": [
1,
1
],
"yaxis": "y"
},
{
"hoverinfo": "skip",
"marker": {
"color": "black",
"size": 10,
"symbol": "arrow-right"
},
"mode": "markers",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
962.7857142857142
],
"xaxis": "x",
"y": [
2
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: intron
Feature Number: 1
Chromosome: 21
Start: 31659784
End: 31663790
Size: 4006
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
120,
1431
],
"xaxis": "x",
"y": [
2,
2
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: intron
Feature Number: 2
Chromosome: 21
Start: 31663886
End: 31666449
Size: 2563
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1527,
1628
],
"xaxis": "x",
"y": [
2,
2
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: intron
Feature Number: 3
Chromosome: 21
Start: 31666518
End: 31667258
Size: 740
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1697,
1798
],
"xaxis": "x",
"y": [
2,
2
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000389995
Feature Type: intron
Feature Number: 4
Chromosome: 21
Start: 31667375
End: 31668471
Size: 1096
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1915,
2016
],
"xaxis": "x",
"y": [
2,
2
],
"yaxis": "y"
},
{
"hoverinfo": "skip",
"marker": {
"color": "black",
"size": 10,
"symbol": "arrow-right"
},
"mode": "markers",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
983.1428571428571
],
"xaxis": "x",
"y": [
3
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: intron
Feature Number: 1
Chromosome: 21
Start: 31659841
End: 31663790
Size: 3949
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
177,
1431
],
"xaxis": "x",
"y": [
3,
3
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: intron
Feature Number: 2
Chromosome: 21
Start: 31663886
End: 31666449
Size: 2563
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1527,
1628
],
"xaxis": "x",
"y": [
3,
3
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: intron
Feature Number: 3
Chromosome: 21
Start: 31666518
End: 31667258
Size: 740
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1697,
1798
],
"xaxis": "x",
"y": [
3,
3
],
"yaxis": "y"
},
{
"hovertemplate": "transcript_id: ENST00000270142
Feature Type: intron
Feature Number: 4
Chromosome: 21
Start: 31667375
End: 31668471
Size: 1096
",
"line": {
"color": "black",
"width": 0.5
},
"mode": "lines",
"opacity": 1,
"showlegend": false,
"type": "scatter",
"x": [
1915,
2016
],
"xaxis": "x",
"y": [
3,
3
],
"yaxis": "y"
},
{
"boxmean": true,
"boxpoints": "all",
"fillcolor": "grey",
"jitter": 0.3,
"legendgroup": "expression",
"legendgrouptitle": {
"text": "Expression Plot Hue"
},
"line": {
"width": 0.5
},
"marker": {
"color": "black",
"opacity": 1,
"size": 5
},
"name": "Box Plots",
"offsetgroup": "0",
"opacity": 1,
"orientation": "h",
"pointpos": 0,
"showlegend": true,
"text": [
"sample_1",
"sample_4",
"sample_7",
"sample_2",
"sample_6",
"sample_3",
"sample_5",
"sample_8"
],
"type": "box",
"x": [
0,
0,
0,
0,
0,
0,
0,
0
],
"xaxis": "x2",
"y": [
0,
0,
0,
0,
0,
0,
0,
0
],
"yaxis": "y2"
},
{
"boxmean": true,
"boxpoints": "all",
"fillcolor": "grey",
"jitter": 0.3,
"legendgroup": "expression",
"legendgrouptitle": {
"text": ""
},
"line": {
"width": 0.5
},
"marker": {
"color": "black",
"opacity": 1,
"size": 5
},
"name": "Box Plots",
"offsetgroup": "0",
"opacity": 1,
"orientation": "h",
"pointpos": 0,
"showlegend": false,
"text": [
"sample_1",
"sample_4",
"sample_7",
"sample_2",
"sample_6",
"sample_3",
"sample_5",
"sample_8"
],
"type": "box",
"x": [
13.01121,
33.24766,
66.96726,
51.97457,
44.89448,
27.91332,
29.3307,
50.35971
],
"xaxis": "x2",
"y": [
1,
1,
1,
1,
1,
1,
1,
1
],
"yaxis": "y2"
},
{
"boxmean": true,
"boxpoints": "all",
"fillcolor": "grey",
"jitter": 0.3,
"legendgroup": "expression",
"legendgrouptitle": {
"text": ""
},
"line": {
"width": 0.5
},
"marker": {
"color": "black",
"opacity": 1,
"size": 5
},
"name": "Box Plots",
"offsetgroup": "0",
"opacity": 1,
"orientation": "h",
"pointpos": 0,
"showlegend": false,
"text": [
"sample_1",
"sample_4",
"sample_7",
"sample_2",
"sample_6",
"sample_3",
"sample_5",
"sample_8"
],
"type": "box",
"x": [
103.45822,
278.6152,
204.75457,
262.00388,
227.70089,
178.30945,
37.95737,
227.15655
],
"xaxis": "x2",
"y": [
2,
2,
2,
2,
2,
2,
2,
2
],
"yaxis": "y2"
},
{
"boxmean": true,
"boxpoints": "all",
"fillcolor": "grey",
"jitter": 0.3,
"legendgroup": "expression",
"legendgrouptitle": {
"text": ""
},
"line": {
"width": 0.5
},
"marker": {
"color": "black",
"opacity": 1,
"size": 5
},
"name": "Box Plots",
"offsetgroup": "0",
"opacity": 1,
"orientation": "h",
"pointpos": 0,
"showlegend": false,
"text": [
"sample_1",
"sample_4",
"sample_7",
"sample_2",
"sample_6",
"sample_3",
"sample_5",
"sample_8"
],
"type": "box",
"x": [
55869.53057,
215866.13713,
149305.27817,
191291.02155,
191269.40463,
101614.77723,
12803.71193,
183275.48374
],
"xaxis": "x2",
"y": [
3,
3,
3,
3,
3,
3,
3,
3
],
"yaxis": "y2"
}
],
"layout": {
"annotations": [
{
"font": {
"size": 16
},
"showarrow": false,
"text": "Transcript Structure",
"x": 0.245,
"xanchor": "center",
"xref": "paper",
"y": 1,
"yanchor": "bottom",
"yref": "paper"
},
{
"font": {
"size": 16
},
"showarrow": false,
"text": "Counts",
"x": 0.755,
"xanchor": "center",
"xref": "paper",
"y": 1,
"yanchor": "bottom",
"yref": "paper"
}
],
"boxgap": 0.2,
"boxgroupgap": 0.8,
"boxmode": "group",
"height": 500,
"hoverlabel": {
"font": {
"size": 12
}
},
"hovermode": "closest",
"legend": {
"font": {
"size": 12
},
"grouptitlefont": {
"size": 14
},
"tracegroupgap": 7
},
"margin": {
"b": 50,
"l": 100,
"r": 50,
"t": 100
},
"showlegend": true,
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "white",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "white",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "#C8D4E3",
"linecolor": "#C8D4E3",
"minorgridcolor": "#C8D4E3",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "#C8D4E3",
"linecolor": "#C8D4E3",
"minorgridcolor": "#C8D4E3",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "white",
"showlakes": true,
"showland": true,
"subunitcolor": "#C8D4E3"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "white",
"polar": {
"angularaxis": {
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": ""
},
"bgcolor": "white",
"radialaxis": {
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
},
"yaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
},
"zaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
},
"baxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
},
"bgcolor": "white",
"caxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "#EBF0F8",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "#EBF0F8",
"zerolinewidth": 2
}
}
},
"title": {
"text": ""
},
"violingap": 0.2,
"violingroupgap": 0.8,
"violinmode": "group",
"width": 1200,
"xaxis": {
"anchor": "y",
"domain": [
0,
0.49
],
"showgrid": true,
"showticklabels": false,
"tickfont": {
"size": 12
},
"title": {
"text": ""
}
},
"xaxis2": {
"anchor": "y2",
"domain": [
0.51,
1
],
"showgrid": true,
"showticklabels": true,
"tickfont": {
"size": 12
},
"title": {
"text": ""
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"range": [
-0.8,
3.8
],
"showgrid": true,
"showticklabels": true,
"tickfont": {
"color": "black",
"family": "DejaVu Sans",
"size": 12
},
"ticktext": [
"ENST00000476106",
"ENST00000470944",
"ENST00000389995",
"ENST00000270142"
],
"tickvals": [
0,
1,
2,
3
],
"title": {
"text": ""
}
},
"yaxis2": {
"anchor": "x2",
"domain": [
0,
1
],
"matches": "y",
"range": [
-0.8,
3.8
],
"showgrid": true,
"showticklabels": false,
"ticks": "",
"ticktext": [
"ENST00000476106",
"ENST00000470944",
"ENST00000389995",
"ENST00000270142"
],
"tickvals": [
0,
1,
2,
3
]
}
}
},
"text/html": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"\"\"\"\n",
"Create traces for plotting, the expression plot will come out in\n",
"the order of columns passed on the `expression_columns` parameters.\n",
"This is important if you are passing multiple expression columns\n",
"like CPM and relative abundance.\n",
"\"\"\"\n",
"traces = RNApy.make_traces(annotation=sod1_annotation, expression_matrix=sod1_counts_matrix, \n",
" x_start=\"rescaled_start\", x_end=\"rescaled_end\",\n",
" y='transcript_id', annotation_hue=\"transcript_biotype\",\n",
" hover_start=\"start\", hover_end=\"end\",\n",
" expression_columns=[\"counts\"])\n",
"\n",
"\"\"\"\n",
"Put traces into the figure. The order of `subplot_titles` is important.\n",
"The first plot will always be \"Transcript Structure\" if you passed an annotation\n",
"to make the traces. After that the order of the expression plots is determined \n",
"by the `expression_columns` parameter passed to the `make_traces()` function.\n",
"\"\"\"\n",
"fig = RNApy.make_plot(traces = traces, subplot_titles = [\"Transcript Structure\", \"Counts\"], width=1200, height=500)\n",
"\n",
"## Show figure\n",
"fig.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}