Skip to content

Commit

Permalink
Merge branch 'ui-v2' of github.com:IGS/gEAR into ui-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jorvis committed Aug 1, 2024
2 parents a04ebcf + c4f85a4 commit 938fd39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/geardb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ def get_layouts(self, user=None, include_public=False):
JOIN layout_displays lm ON lm.layout_id=l.id
JOIN dataset_display dd ON dd.id =lm.display_id
WHERE dd.dataset_id = %s
AND (l.user_id = 0 OR l.user_id = %s)
AND (l.is_domain = 1 OR l.user_id = %s)
ORDER BY l.label
"""
cursor.execute(qry, (self.id, user.id))
Expand All @@ -1866,7 +1866,7 @@ def get_layouts(self, user=None, include_public=False):
JOIN layout_displays lm ON lm.layout_id=l.id
JOIN dataset_display dd ON dd.id =lm.display_id
WHERE dd.dataset_id = %s
AND l.user_id = 0
AND l.is_domain = 1
ORDER BY l.label
"""
cursor.execute(qry, (self.id,))
Expand All @@ -1884,6 +1884,7 @@ def get_layouts(self, user=None, include_public=False):
JOIN dataset_display dd ON dd.id =lm.display_id
WHERE dd.dataset_id = %s
AND l.is_public = 1
AND l.is_domain = 0
ORDER BY l.label
"""
cursor.execute(qry, (self.id,))
Expand Down
4 changes: 4 additions & 0 deletions www/cgi/get_pattern_element_list.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def main():
up_genes = df.nlargest(n=5, columns=[col]).iloc[:, 1].tolist()
down_genes = df.nsmallest(n=5, columns=[col]).iloc[:, 1].tolist()

# if there are no negative values, the down_genes should be empty
if all([v >= 0 for v in df[col]]):
down_genes = []

# If all values are either 0 or 1, the pattern can be a binary weight
binary = all([v in [0, 1] for v in df[col]])

Expand Down

0 comments on commit 938fd39

Please sign in to comment.