@@ -0,0 +1,1023 @@
+import metaseq%0A%0A%0Aclass Chipseq(object):%0A    def __init__(self, ip_bam, control_bam):%0A        self.ip = metaseq.genomic_signal(ip_bam, kind='bam')%0A        self.control = metaseq.genomic_signal(control_bam, kind='bam')%0A        self.ip_array = None%0A        self.control_array = None%0A%0A%0A    def diffed_array(self, features, force=False, func=None, **kwargs):%0A        %22%22%22%0A        %60func%60 is a function to apply to the diffed arrays, by default%0A        metaseq.plotutils.nice_log; another option might be %60lambda x: x%60, %0A        or %60lambda x: 1e6*x%60%0A        %22%22%22%0A        if not self.ip_array or force:%0A            self.ip_array = self.ip.array(features, **kwargs)%0A            self.ip_array /= self.ip.million_mapped_reads()%0A        if not self.control_array or force:%0A            self.control_array = self.control.array(features, **kwargs)%0A            self.controL_array /= self.control.million_mapped_reads()%0A%0A        if func is None:%0A            metaseq.plotutils.nice_log%0A%0A        return func(self.ip_array - self.control_array)%0A

add integration submodule and start of chipseq class