Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #47 from a-slide/dev
Browse files Browse the repository at this point in the history
Fix behaviour of comp report if no significant pvalue
  • Loading branch information
a-slide authored Oct 20, 2020
2 parents a4d8312 + f6845f8 commit c2aaff9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "0.4.23" %}
{% set version = "0.4.25" %}
{% set name = "pycoMeth" %}

package:
Expand Down
12 changes: 8 additions & 4 deletions pycoMeth/Comp_Report.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,21 +786,25 @@ def tss_dist_plot (

"""Plot an ideogram of significant sites distribution per chromosome """

sig_val = df["distance to tss"][df["pvalue"]<=pvalue_threshold].dropna()
non_sig_val = df["distance to tss"][df["pvalue"]>pvalue_threshold].dropna()
if df.empty:
return None

sig_val = df[df["pvalue"]<=pvalue_threshold].dropna()
non_sig_val = df[df["pvalue"]>pvalue_threshold].dropna()

if sig_val.empty:
return None

if not non_sig_val.empty:
x_ns, y_ns = gaussian_hist (
val_list=non_sig_val,
val_list=non_sig_val["distance to tss"],
start=-max_distance,
stop=max_distance,
num=n_bins,
smooth_sigma=smooth_sigma)

x_sig, y_sig = gaussian_hist (
val_list=sig_val,
val_list=sig_val["distance to tss"],
start=-max_distance,
stop=max_distance,
num=n_bins,
Expand Down
2 changes: 1 addition & 1 deletion pycoMeth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

# Define self package variable
__version__ = "0.4.23"
__version__ = "0.4.25"
__description__ = 'DNA methylation analysis downstream to Nanopolish for Oxford Nanopore DNA sequencing datasets'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Define package info
name = "pycoMeth"
version = "0.4.23"
version = "0.4.25"
description = "DNA methylation analysis downstream to Nanopolish for Oxford Nanopore DNA sequencing datasets"
with open("README.md", "r") as fh:
long_description = fh.read()
Expand Down

0 comments on commit c2aaff9

Please sign in to comment.