Skip to content

Commit

Permalink
reverting back to previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
kataikko committed Sep 11, 2023
1 parent 07313d0 commit f61b260
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/src/enrichment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
def calc_proteins_pval(curr, alpha, in_pr, bg_proteins, num_in_prot):
# Lists are read as strings, evaluate to lists using JSON.
# alternative is using eval() which is slower
prot_list = curr.replace("'", '"')
prot_list = json.loads(prot_list)

# get the protein length of term
num_term_prot = len(curr)
num_term_prot = len(prot_list)

# Get intersection of proteins
prots_term = list(set(curr) & in_pr)
prots_term = list(set(prot_list) & in_pr)
num_inter = len(prots_term)

if num_inter == 0:
Expand Down

0 comments on commit f61b260

Please sign in to comment.