This is a test version of Biostars. For the public version, visit https://www.biostars.org.
plots of genomic annotations together with fictitious RNA binding protein data with python

I have 2 dataframe that look like this:

df1

name    type        start       stop                        strand

0   geneA   transcript  2000        7764        +

1   geneA   exon        2700        5100        +

2   geneA   exon        6000        6800        +

3   geneB   transcript  9000        12720       -

4   geneB   exon        9900        10100       -

df2

    P1  P2  P3  P4
0   0.28    0.14    0.19    0.19

1   0.30    0.16    0.17    0.20

2   0.26    0.13    0.20    0.12

3   0.21    0.13    0.25    0.15

4   0.31    0.03    0.24    0.20

I tried doing this:

ax = df1.plot()

df1.plot(ax=ax)

But, I did not get any meaningful plot . I am very new to python. I will appreciate any solution on how to generate this plot.

I find it difficult to format the dataframe. I could not find my way around

Thanks

python annotation matplotlib

0 answers

No answers yet.

Log in to answer this question.