Skip to content

Commit

Permalink
Enable ATAC-seq mode, bump to v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Piper committed Nov 25, 2015
1 parent 5029f59 commit b3def9f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.2.1 - 2015-12-25
==================
* ENHANCEMENT: ATAC-seq mode for ``wellington_bootstrap.py``

0.2.0 - 2015-12-18
==================
* FEATURE: Differential Footprinting between treatment and control (``wellington_bootstrap.py``)
Expand Down
2 changes: 1 addition & 1 deletion pyDNase/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.0"
__version__ = "0.2.1"
5 changes: 3 additions & 2 deletions pyDNase/scripts/wellington_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def __call__(self):
parser.add_argument("-p", "--processes", help="Number of processes to use (default: uses all CPUs)",
default=0,
type=int)
parser.add_argument("-A", action="store_true", help="ATAC-seq mode (default: False)", default=False)
parser.add_argument("treatment_bam", help="BAM file for treatment")
parser.add_argument("control_bam", help="BAM file for control")
parser.add_argument("bedsites", help="BED file of genomic locations to search in")
Expand All @@ -175,9 +176,9 @@ def __call__(self):
assert args.FDR_limit < 0, "FDR limit must be less than 0"

# Treatment
reads2 = pyDNase.BAMHandler(args.treatment_bam, caching=0)
reads2 = pyDNase.BAMHandler(args.treatment_bam, caching=0, ATAC=clargs.A)
# Control
reads1 = pyDNase.BAMHandler(args.control_bam, caching=0)
reads1 = pyDNase.BAMHandler(args.control_bam, caching=0, ATAC=clargs.A)
# Regions of Interest
regions = pyDNase.GenomicIntervalSet(args.bedsites)
# Output
Expand Down
3 changes: 1 addition & 2 deletions pyDNase/scripts/wellington_footprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def xrange_from_string(range_string):
max_regions_cached_in_memory = 10 * CPUs
p = mp.Pool(CPUs)

#TODO: How about we store a dictionary of open file handles - or would this cause problems with threading?

def writetodisk(fp):
#Raw WIG scores
print >> wigout, "fixedStep\tchrom=" + str(fp.interval.chromosome) + "\t start="+ str(fp.interval.startbp) +"\tstep=1"
Expand Down Expand Up @@ -147,7 +147,6 @@ def multiWellington(regions,reads,**kwargs):
p.join()

#TODO: Use **args or something similar to pass arguments?
#TODO: Pass FDR Iterations, FDR LimiFDR_cutoff=0.01,FDR_iterations=100
multiWellington(orderedbychr,reads, shoulder_sizes = clargs.shoulder_sizes ,footprint_sizes = clargs.footprint_sizes, FDR_cutoff=clargs.FDR_cutoff,FDR_iterations=clargs.FDR_iterations,bonferroni = clargs.bonferroni)

wigout.close()

0 comments on commit b3def9f

Please sign in to comment.