Skip to content

Commit

Permalink
fix issue with trackhub metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hpratt committed Dec 11, 2021
1 parent 3e268b0 commit 78fc063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/models/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, assembly, pgSearch):
dnase: experimentAccession(assay: "DNase")
h3k4me3: experimentAccession(assay: "H3K4me3")
h3k27ac: experimentAccession(assay: "H3K27ac")
ctcf: experimentAccession(assay: "CTCF") }
ctcf: experimentAccession(assay: "CTCF") }
}
}""", "variables": { "assembly": assembly.lower() }
}).json()["data"]["ccREBiosampleQuery"]["biosamples"]
Expand All @@ -55,7 +55,7 @@ def __init__(self, assembly, pgSearch):
"synonyms": None,
"tissue": x["ontology"],
"value": x["name"]
} for a in [ "CTCF", "H3K4me3", "H3K27ac", "DNase" ] if x[a.lower()] is not None ]
} for a in [ "CTCF", "H3K4me3", "H3K27ac", "DNase" ] if x[a.lower()] is not None and x[a.lower() + "File"] is not None ]

# used by trees
self.biosampleTypeToCellTypes = {}
Expand Down
3 changes: 2 additions & 1 deletion api/models/trackhubdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self, assembly, expID, fileID, assay, parent, active, ct):

def _init(self):
p = OrderedDict()
p["track"] = Helpers.sanitize(self.expID + '_' + self.fileID)
p["track"] = Helpers.sanitize(str(self.expID) + '_' + str(self.fileID))
p["parent"] = self.parent
p["bigDataUrl"] = self._url()
p["visibility"] = Helpers.viz("full", self.active)
Expand Down Expand Up @@ -326,6 +326,7 @@ def _add_ct_bigWigs(self, ct, show7group, superTrackName):

cache = self.cacheW[self.assembly if self.assembly != "hg38" else "GRCh38"]
for expInfo in cache.datasets.byCellType[ct]:
if expInfo["expID"] is None or expInfo["fileID"] is None: continue
tt = BigWigTrack(self.assembly, expInfo["expID"], expInfo["fileID"],
expInfo["assay"], superTrackName, True, ct)
t = tt.lines(self.priority)
Expand Down

0 comments on commit 78fc063

Please sign in to comment.