Skip to content

Commit

Permalink
I'm not crying you're crying
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraluebbert committed Sep 25, 2024
1 parent 50bb760 commit c595e0b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
10 changes: 1 addition & 9 deletions gget/gget_enrichr.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,18 +377,10 @@ def enrichr(
If the input genes are Ensembl IDs, please set argument 'ensembl=True'. (For command-line, add flag [-e][--ensembl].)\n
"""
)

# print(r2.headers.get('Content-Type'))
# if r2.content:
# data = r2.json()
# else:
# print("Empty response")
# print(r2.text)

# Replace inf values with "inf" string
response_text = r2.text.replace('Infinity', '"inf"')
response_text = r2.text.replace("Infinity", '"inf"')
enrichr_results = json_package.loads(response_text)
# enrichr_results = r2.json()

## Build data frame (standard return)
# Define column names
Expand Down
28 changes: 16 additions & 12 deletions tests/fixtures/test_blast.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@
"limit": 1,
"json": true
},
"expected_result": [{"Description": "Homo sapiens ATAC-STARR-seq lymphoblastoid active region 16974 (LOC129935398) on chromosome 2",
"Scientific Name": "Homo sapiens",
"Common Name": "human",
"Taxid": 9606,
"Max Score": 222,
"Total Score": 222,
"Query Cover": "100%",
"E value": 6e-54,
"Per. Ident": "100.00%",
"Acc. Len": 460,
"Accession": "NG_168413.1"}]
"expected_result": [
{
"Description": "Homo sapiens ATAC-STARR-seq lymphoblastoid active region 16974 (LOC129935398) on chromosome 2",
"Scientific Name": "Homo sapiens",
"Common Name": "human",
"Taxid": 9606,
"Max Score": 222,
"Total Score": 222,
"Query Cover": "100%",
"E value": 6e-54,
"Per. Ident": "100.00%",
"Acc. Len": 460,
"Accession": "NG_168413.1"
}
]
},
"test_blast_bad_seq": {
"type": "error",
Expand Down Expand Up @@ -91,4 +95,4 @@
},
"expected_result": "ValueError"
}
}
}
2 changes: 1 addition & 1 deletion tests/fixtures/test_enrichr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6306,4 +6306,4 @@
]
]
}
}
}

0 comments on commit c595e0b

Please sign in to comment.