2
    geneid  fdr_new fdr_old
gene1   4.66E-05    1.45E-05
gene2   0.059650791 0.043799129
gene3   0.04405402  0.061581326
gene4   0.032286852 0.088522898
gene5   0.025672937 0.004911527
gene6   0.001094006 0.000229285
gene7   0.098444488 0.002132802
gene8   0.006079767 0.000230392
gene9   0.000117813 0.000894136
gene10  0.004925041 0.002640812
gene11  0.00036314  5.46E-05
gene12  0.026337682 0.018557193
gene13  0.001503366 0.004951799
gene14  3.05E-05    4.37E-06
gene15  0.001006888 0.009248765
gene16  8.11E-05    0.006124903
gene17  0.062408836 0.026734781
gene18  0.09637641  0.097559967
gene19  0.00405273  0.075971307
gene20  0.078261356 0.080722817
gene21  0.033206859 0.019133673
gene22  0.029851363 0.037940196

How can i correlate fdr_old with fdr_new using pandas and get a plot like this enter image description here

thanks

EDIT:

or something like this. enter image description here

1 Answer 1

7

like this?

In [45]: import seaborn as sns

In [46]: sns.lmplot(x='fdr_old', y='fdr_new', data=df)
Out[46]: <seaborn.axisgrid.FacetGrid at 0xbb8b470>

Result:

enter image description here

UPDATE: correlation between two columns:

In [47]: df.filter(like='fdr').corr()
Out[47]:
          fdr_new   fdr_old
fdr_new  1.000000  0.551083
fdr_old  0.551083  1.000000
Sign up to request clarification or add additional context in comments.

15 Comments

what is the difference between linear regression and correlation
@novicebioinforesearcher, please check this answer
so in other words I cannot correlate one column vs one column is that true?
found it need to enter this to get plot inline %matplotlib inline
@novicebioinforesearcher, you need to run magic command: %matplotlib in jupyter notebook
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.