Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Come up with a figure or three on biological results #9

Open
petercombs opened this issue May 7, 2019 · 2 comments
Open

Come up with a figure or three on biological results #9

petercombs opened this issue May 7, 2019 · 2 comments

Comments

@petercombs
Copy link
Owner

My first thought here is to just have a scatterplot with log10 pvalue for upregulation on the x axis, and log10 pvalue for downregulation on the y axis.

  |  p               p p 
l |
o |
g |  p                  
p |     e    e
  |   e e        p     p   p
 +---------------------
           log p 

Where p are the promoters and e are the enhancers.

@petercombs
Copy link
Owner Author

Okay, so let's try plotting a polarized -log10 pvalue—if KxKn is greater than 1, it is to the right/above the axis by an amount proportional to the -log10 pvalue.

scores = pd.read_table('ElementWiseScores - Sheet1.tsv', index_col=0)
for i,e in enumerate(scores.Type.unique()):
    hits = scores.loc[scores.Type == e]
    scatter(- np.sign(log(hits.KdKn)) * np.log10(hits.p_KdKn), - 
np.sign(log(hits.KuKn))*np.log10(hits.p_KuKn), marker=['p', '*'][i], label=e)
lspine = ax.spines['left']
rspine = ax.spines['right']
rspine.set_alpha(0)
lspine.set_position(('data', 0))
ax.spines['bottom'].set_position(('data', 0))
ax.spines['top'].set_alpha(0)
legend(loc='center left')
for ix in scores.index:
    text(-log10(scores.p_KdKn[ix])*sign(log(scores.KdKn[ix])), -log10(scores.p_KuKn[ix])*sign(log(scores.KuKn[ix])), ix)

image

Okay, so that figure is really busy, and actually dispels a trend I thought I saw that KdKn (x axis) was significantly more likely to be less than 1 (not obviously true), while KuKn was more likely to be above 1 (almost certainly true).

@petercombs
Copy link
Owner Author

From Hunter:

could you try randomly shuffling the expr change assigned to each mutation and see if the significant results go away, as a negative control?

and could you generate all the trees with up/down-reg indicated on each branch (either by color or numbers)? we could pick a couple for the main figs, and the rest could go in the supp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant