diff --git a/pyDNase/footprinting/WellingtonC.h b/pyDNase/footprinting/WellingtonC.h index be29354..5355415 100644 --- a/pyDNase/footprinting/WellingtonC.h +++ b/pyDNase/footprinting/WellingtonC.h @@ -188,7 +188,7 @@ struct tuple2 * wellington(unsigned int const * const f, unsigned int const * c unsigned const int xBackward = b_bindingArray[i+halffpround+1]; unsigned const int nBackward = xBackward + rv_fpscores[i-halffpround]; - if (xForward > 0 & xBackward > 0) + if (xForward > 0 && xBackward > 0) { float const p = (float)shoulder / (shoulder + fp_size); float const score = bdtrc(xForward - 1, nForward, p) + bdtrc(xBackward - 1, nBackward, p); @@ -238,7 +238,7 @@ struct tuple2 * wellington1D(unsigned int const * const f, unsigned int const * unsigned const int xBackward = b_bindingArray[i+halffpround+1]; unsigned const int nBackward = xBackward + rv_fpscores[i-halffpround]; - if (xForward > 0 & xBackward > 0) + if (xForward > 0 && xBackward > 0) { float const p = (float)(shoulder*2) / ((shoulder*2) + fp_size); float const score = bdtrc(xForward + xBackward - 1, nForward + nBackward, p); @@ -367,7 +367,7 @@ struct tuple2 * diff_wellington(unsigned int const * const f, unsigned int cons // float t_score = 0.0; // -// if (xForwardt > 0 & xBackwardt > 0) +// if (xForwardt > 0 && xBackwardt > 0) // { // float const p = (float)shoulder / (shoulder + fp_size); // t_score = bdtrc(xForwardt - 1, nForwardt, p) + bdtrc(xBackwardt - 1, nBackwardt, p); @@ -395,7 +395,7 @@ struct tuple2 * diff_wellington(unsigned int const * const f, unsigned int cons float prior_score; - if (xForward > 0 & xBackward > 0) + if (xForward > 0 && xBackward > 0) { const float p = (float)shoulder / (shoulder + fp_size); prior_score = bdtrc(xForward - 1, nForward, p) + bdtrc(xBackward - 1, nBackward, p); @@ -417,7 +417,7 @@ struct tuple2 * diff_wellington(unsigned int const * const f, unsigned int cons unsigned const int nForward = slice(t_f2,0,shoulder + fp_size); unsigned const int xBackward = slice(t_r2,shoulder + fp_size,shoulder + shoulder + fp_size); unsigned const int nBackward = slice(t_r2,shoulder,shoulder + shoulder + fp_size); - if (xForward > 0 & xBackward > 0) + if (xForward > 0 && xBackward > 0) { float const p = (float)shoulder / (shoulder + fp_size); bootstrap_score[i] = bdtrc(xForward - 1, nForward, p) + bdtrc(xBackward - 1, nBackward, p); @@ -448,4 +448,4 @@ struct tuple2 * diff_wellington(unsigned int const * const f, unsigned int cons retarr->fpscores = scores; retarr->mles = mle; return retarr; -} \ No newline at end of file +} diff --git a/pyDNase/scripts/dnase_average_profile.py b/pyDNase/scripts/dnase_average_profile.py index c7876ab..f7427e4 100755 --- a/pyDNase/scripts/dnase_average_profile.py +++ b/pyDNase/scripts/dnase_average_profile.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse import pyDNase import numpy as np diff --git a/pyDNase/scripts/dnase_bias_estimator.py b/pyDNase/scripts/dnase_bias_estimator.py index 9e142fd..e6fbb41 100755 --- a/pyDNase/scripts/dnase_bias_estimator.py +++ b/pyDNase/scripts/dnase_bias_estimator.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import os, argparse, tempfile, operator, pickle from collections import defaultdict import pybedtools, pysam diff --git a/pyDNase/scripts/dnase_cut_counter.py b/pyDNase/scripts/dnase_cut_counter.py index b2ba1b8..abc8184 100755 --- a/pyDNase/scripts/dnase_cut_counter.py +++ b/pyDNase/scripts/dnase_cut_counter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse import pyDNase from clint.textui import progress, puts diff --git a/pyDNase/scripts/dnase_ddhs_scorer.py b/pyDNase/scripts/dnase_ddhs_scorer.py index 1e1a38c..f7e0104 100755 --- a/pyDNase/scripts/dnase_ddhs_scorer.py +++ b/pyDNase/scripts/dnase_ddhs_scorer.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse import pyDNase import math diff --git a/pyDNase/scripts/dnase_fos_scorer.py b/pyDNase/scripts/dnase_fos_scorer.py index e904432..84d2c68 100755 --- a/pyDNase/scripts/dnase_fos_scorer.py +++ b/pyDNase/scripts/dnase_fos_scorer.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse import pyDNase from clint.textui import progress diff --git a/pyDNase/scripts/dnase_pretty_picture.py b/pyDNase/scripts/dnase_pretty_picture.py index 3158788..c79fe8c 100755 --- a/pyDNase/scripts/dnase_pretty_picture.py +++ b/pyDNase/scripts/dnase_pretty_picture.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python __author__ = "Jason Piper" """ @@ -134,4 +135,4 @@ plt.tight_layout() plt.savefig(args.output) -#plt.show() \ No newline at end of file +#plt.show() diff --git a/pyDNase/scripts/dnase_to_JSON.py b/pyDNase/scripts/dnase_to_JSON.py index 691d310..74cad6a 100755 --- a/pyDNase/scripts/dnase_to_JSON.py +++ b/pyDNase/scripts/dnase_to_JSON.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse, pyDNase from clint.textui import puts, progress parser = argparse.ArgumentParser(description='Writes a JSON file of DNase I cuts for regions from a BED file') diff --git a/pyDNase/scripts/dnase_to_javatreeview.py b/pyDNase/scripts/dnase_to_javatreeview.py index 7858383..99ff957 100755 --- a/pyDNase/scripts/dnase_to_javatreeview.py +++ b/pyDNase/scripts/dnase_to_javatreeview.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse, pyDNase, csv, random import numpy as np from clint.textui import puts, progress @@ -80,4 +81,4 @@ def normalise_cuts(cuts): newarray = np.subtract(cuts["+"], cuts["-"]) - outfile.writerow(["NULL","NULL",i.chromosome + ":" + str(i.startbp) + ":" + str(i.endbp)] + newarray.tolist()) \ No newline at end of file + outfile.writerow(["NULL","NULL",i.chromosome + ":" + str(i.startbp) + ":" + str(i.endbp)] + newarray.tolist()) diff --git a/pyDNase/scripts/dnase_wig_tracks.py b/pyDNase/scripts/dnase_wig_tracks.py index 67a728f..f121af7 100755 --- a/pyDNase/scripts/dnase_wig_tracks.py +++ b/pyDNase/scripts/dnase_wig_tracks.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import argparse from clint.textui import progress, puts import pyDNase @@ -38,4 +39,4 @@ print(-i, file=bwigout) fwigout.close() -bwigout.close() \ No newline at end of file +bwigout.close() diff --git a/pyDNase/scripts/wellington_bootstrap.py b/pyDNase/scripts/wellington_bootstrap.py index fb809ac..bd56921 100755 --- a/pyDNase/scripts/wellington_bootstrap.py +++ b/pyDNase/scripts/wellington_bootstrap.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import pyDNase, pyDNase.footprinting import numpy as np from clint.textui import progress diff --git a/pyDNase/scripts/wellington_footprints.py b/pyDNase/scripts/wellington_footprints.py index 384fb39..545c4f3 100755 --- a/pyDNase/scripts/wellington_footprints.py +++ b/pyDNase/scripts/wellington_footprints.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import multiprocessing as mp import argparse, os from clint.textui import progress, puts_err diff --git a/setup.py b/setup.py index 4becbcc..643af6d 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,7 @@ install_requires=[ # Not enforcing versions for numpy as it can be a bitch to upgrade + "Cython", "numpy", # Tested on >=1.5.0 "matplotlib < 2.0.0", # mpl > 2.0 only works on py3 "pysam >= 0.8.1", @@ -47,4 +48,4 @@ "pyDNase/scripts/dnase_to_JSON.py", "pyDNase/scripts/dnase_bias_estimator.py"], test_suite="test", -) \ No newline at end of file +)