Skip to content

Commit

Permalink
snp_arrow only draws if focus snp is set
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhsu3 committed Jul 12, 2015
1 parent c265915 commit 4feaa16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: python
python:
- 2.7


install: "pip install -r requirements.txt"
env:
global:
- NOSE_ARGS="not slow"
Expand Down
15 changes: 4 additions & 11 deletions genda/eQTL/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
import matplotlib.pyplot as plt
from statsmodels.graphics.regressionplots import abline_plot

from genda.plotting import (should_not_plot, snp_arrow)
from genda.plotting import (snp_arrow)
from genda import calculate_minor_allele_frequency, calculate_ld



class gene_reference(object):
"""
"""
Expand Down Expand Up @@ -188,17 +187,11 @@ def plot_eQTL(meQTL, gene_name, annotation, dosage, ax=None,
### Actual scatter #############################
im = ax.scatter(pos, adj_pv, s=dosage_maf, c = color1)
#:TODO make the arrow into a funciton
ax = snp_arrow(snpx, snp_pv, snp, ax)
if focus_snp:
ax = snp_arrow(snpx, snp_pv, snp, ax)
else: pass
ax.set_ylabel(r'$-log_{10}$ eQTL p-value')
ax.set_xlabel(r'Position (Mb)')
if should_not_plot(gene_annot):
pass
'''
patch = add_gene_bounderies(ax, gene_annot,
gene_name, x_scale)
ax.add_patch(patch)
'''
else: pass
if symbol:
gene_name = symbol
if ax_orig:
Expand Down
3 changes: 2 additions & 1 deletion genda/plotting/annotation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


def snp_arrow(pos, height, snpid, ax, hadjust = 0.0,**kwargs):
def snp_arrow(pos, height, snpid, ax, hadjust = 0.0,
**kwargs):
""" Draws an arrow pointing at a SNP in
a Manhattan plot
Expand Down

0 comments on commit 4feaa16

Please sign in to comment.