def _getUrl(self, exp, norm): if not exp: return None, None, None assay = "DNase" if exp.isH3K27ac(): assay = "H3K27ac" elif exp.isH3K4me3(): assay = " H3K4me3" bigWigs = bigWigFilters(self.assembly, exp.files) if not bigWigs: if "mm10" == self.assembly: bigWigs = bigWigFilters("mm10-minimal", exp.files) if not bigWigs: raise Exception("missing bigWigs for " + exp.encodeID + " assembly " + self.assembly) bigWig = bigWigs[0] url = bigWig.url if "encodeproject" in url: if not url.endswith("?proxy=true"): url += "?proxy=true" if self.urlStatus.find(url) and not self.urlStatus.get(url): url = os.path.join(BIB5, "data", bigWig.expID, bigWig.fileID + ".bigWig") if 0 and norm: if "mm10" == self.assembly: url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: if bigWig.expID.startswith("EN"): url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: url = os.path.join( BIB5, "roadmap_norm/consolidated/", bigWig.expID, bigWig.fileID + '-' + assay + ".fc.signal.norm.bigWig") if exp.isH3K27ac(): name = "H3K27ac Signal" color = EncodeTrackhubColors.H3K27ac_Signal.rgb elif exp.isH3K4me3(): name = "H3K4me3 Signal" color = EncodeTrackhubColors.H3K4me3_Signal.rgb elif exp.isDNaseSeq(): name = "DNase Signal" color = EncodeTrackhubColors.DNase_Signal.rgb else: raise Exception("unexpected exp") return url, name, color
def process(args, expID): exp = MetadataWS.exp(expID) try: bigWigs = bigWigFilters(args.assembly, exp.files) if not bigWigs: return bigWig = bigWigs[0] bigWigFnp = bigWig.fnp() if os.path.exists(bigWig.normFnp()): print "skipping", exp return 0 else: print "missing", bigWig.normFnp() bwAssembly = bigWig.assembly if not bigWigFnp: print exp.getSingleBigWigSingleFnp(args) print "missing", exp else: cmds = [normBin, "--assembly=" + bwAssembly, "--bwFnp=" + bigWig.normFnp(), bigWigFnp] print " ".join(cmds) print Utils.runCmds(cmds) return 0 except Exception, e: print "bad " + str(e)
def process(args, expID): exp = MetadataWS.exp(expID) try: bigWigs = bigWigFilters(args.assembly, exp.files) if not bigWigs: return bigWig = bigWigs[0] bigWigFnp = bigWig.fnp() if os.path.exists(bigWig.normFnp()): print "skipping", exp return 0 else: print "missing", bigWig.normFnp() bwAssembly = bigWig.assembly if not bigWigFnp: print exp.getSingleBigWigSingleFnp(args) print "missing", exp else: cmds = [ normBin, "--assembly=" + bwAssembly, "--bwFnp=" + bigWig.normFnp(), bigWigFnp ] print " ".join(cmds) print Utils.runCmds(cmds) return 0 except Exception, e: print "bad " + str(e)
def _getUrl(self, exp, norm): if not exp: return None, None, None assay = "DNase" if exp.isH3K27ac(): assay = "H3K27ac" elif exp.isH3K4me3(): assay = "H3K4me3" bigWigs = bigWigFilters(self.assembly, exp.files) if not bigWigs: raise Exception("missing bigWigs for " + exp.encodeID) bigWig = bigWigs[0] url = bigWig.url if 1: # self.urlStatus.find(url) and not self.urlStatus.get(url): url = os.path.join(BIB5, "data", bigWig.expID, bigWig.fileID + ".bigWig") if not bigWig.expID.startswith("EN"): url = os.path.join( "http://egg2.wustl.edu/roadmap/data/byFileType/signal/consolidated/macs2signal/foldChange/", bigWig.fileID + '-' + assay + ".fc.signal.bigwig") if norm: if "mm10" == self.assembly: url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: if bigWig.expID.startswith("EN"): url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: url = os.path.join( BIB5, "roadmap_norm/consolidated/", bigWig.expID, bigWig.fileID + '-' + assay + ".fc.signal.norm.bigWig") if exp.isH3K27ac(): name = "H3K27ac Signal" color = EncodeTrackhubColors.H3K27ac_Signal.rgb elif exp.isH3K4me3(): name = "H3K4me3 Signal" color = EncodeTrackhubColors.H3K4me3_Signal.rgb elif exp.isDNaseSeq(): name = "DNase Signal" color = EncodeTrackhubColors.DNase_Signal.rgb else: raise Exception("unexpected exp") return url, name, color
def _getUrl(self, exp, norm): if not exp: return None, None, None assay = "DNase" if exp.isH3K27ac(): assay = "H3K27ac" elif exp.isH3K4me3(): assay = "H3K4me3" bigWigs = bigWigFilters(self.assembly, exp.files) if not bigWigs: raise Exception("missing bigWigs for " + exp.encodeID) bigWig = bigWigs[0] url = bigWig.url if 1: # self.urlStatus.find(url) and not self.urlStatus.get(url): url = os.path.join(BIB5, "data", bigWig.expID, bigWig.fileID + ".bigWig") if not bigWig.expID.startswith("EN"): url = os.path.join("http://egg2.wustl.edu/roadmap/data/byFileType/signal/consolidated/macs2signal/foldChange/", bigWig.fileID + '-' + assay + ".fc.signal.bigwig") if norm: if "mm10" == self.assembly: url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: if bigWig.expID.startswith("EN"): url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: url = os.path.join(BIB5, "roadmap_norm/consolidated/", bigWig.expID, bigWig.fileID + '-' + assay + ".fc.signal.norm.bigWig") if exp.isH3K27ac(): name = "H3K27ac Signal" color = EncodeTrackhubColors.H3K27ac_Signal.rgb elif exp.isH3K4me3(): name = "H3K4me3 Signal" color = EncodeTrackhubColors.H3K4me3_Signal.rgb elif exp.isDNaseSeq(): name = "DNase Signal" color = EncodeTrackhubColors.DNase_Signal.rgb else: raise Exception("unexpected exp") return url, name, color
def process(assembly, exp): bigWigs = bigWigFilters(assembly, exp.files) if not bigWigs: if "mm10" == assembly: bigWigs = [TempWrap(exp.encodeID, eidToBigWigFileID[exp.encodeID])] if not bigWigs: print "missing bigWigs for " + exp.encodeID return if 0 and len(bigWigs) > 1: print "weird", bigWigs sys.exit(1) bigWig = bigWigs[0] if "eid" in bigWig.fnp(): return # ignore Roadmap for now print bigWig.fnp()
def _getUrl(self, exp, norm): if not exp: return None, None, None assay = "DNase" if exp.isH3K4me3(): assay = "H3K4me3" bigWigs = bigWigFilters(self.assembly, exp.files) if not bigWigs: raise Exception("missing bigWigs for " + exp.encodeID) bigWig = bigWigs[0] url = bigWig.url if self.urlStatus.find(url) and not self.urlStatus.get(url): url = os.path.join(BIB5, "data", bigWig.expID, bigWig.fileID + ".bigWig") if norm: if "mm10" == self.assembly: url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: if bigWig.expID.startswith("EN"): url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: url = os.path.join( BIB5, "roadmap_norm/consolidated/", bigWig.expID, bigWig.fileID + '-' + assay + ".fc.signal.norm.bigWig") if exp.isH3K4me3(): name = "H3K4me3 Signal" color = "18,98,235" elif exp.isDNaseSeq(): name = "DNase Signal" color = "255,121,3" else: raise Exception("unexpected exp") return url, name, color
def _getUrl(self, exp, norm): if not exp: return None, None, None assay = "DNase" if exp.isH3K4me3(): assay = "H3K4me3" bigWigs = bigWigFilters(self.assembly, exp.files) if not bigWigs: raise Exception("missing bigWigs for " + exp.encodeID) bigWig = bigWigs[0] url = bigWig.url if 1: # self.urlStatus.find(url) and not self.urlStatus.get(url): url = os.path.join(BIB5, "data", bigWig.expID, bigWig.fileID + ".bigWig") if norm: if "mm10" == self.assembly: url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: if bigWig.expID.startswith("EN"): url = os.path.join(BIB5, "encode_norm", bigWig.expID, bigWig.fileID + ".norm.bigWig") else: url = os.path.join(BIB5, "roadmap_norm/consolidated/", bigWig.expID, bigWig.fileID + '-' + assay + ".fc.signal.norm.bigWig") if exp.isH3K4me3(): name = "H3K4me3 Signal" color = "18,98,235" elif exp.isDNaseSeq(): name = "DNase Signal" color = "255,121,3" else: raise Exception("unexpected exp") return url, name, color