reactome2py icon indicating copy to clipboard operation
reactome2py copied to clipboard

The default value of the resource argument of the Content Service differs from the REST API

Open 136s opened this issue 2 years ago • 0 comments

In /exporter/diagram/{identifier}.{ext}, the Default value of resource is TOTAL, but in resultome2py.content.export_diagram, Total. This prevents markers from being colored in the following code.

from reactome2py import content, analysis


markers = "RAS,MAP,IL10,EGF,EGFR,STAT"
result = analysis.identifiers(ids=markers)
token = result["summary"]["token"]
stId = result["pathways"][0]["stId"]
for i, resource in enumerate(["Total", "TOTAL"]):
    content.export_diagram(
        id=stId, resource=resource, token=token, file=f"{i}-{resource}"
    )
Markers in 0-Total.png are not colored. Markers in 1-TOTAL.png are colored.
0-Total 1-TOTAL

Therefore, Total should be replaced by TOTAL.

136s avatar Jan 23 '24 08:01 136s