Skip to content
Snippets Groups Projects
Commit 6704221f authored by Hartung, Michael's avatar Hartung, Michael
Browse files

tissue expression request to POST to allow longer lists of proteins

Former-commit-id: 755d98b0c11f7d2ddc7f757dc2e55d3ce37b1adb [formerly ca8be5a502dde8a89db50e7cfc67787acbf5795d]
Former-commit-id: f89bd2f8c061fe596feddb955a25fe5ca8be7751
parent a34d482c
No related branches found
No related tags found
No related merge requests found
......@@ -637,15 +637,15 @@ class TissueExpressionView(APIView):
Expression of host proteins in tissues.
"""
def get(self, request) -> Response:
tissue = Tissue.objects.get(id=request.query_params.get('tissue'))
def post(self, request) -> Response:
tissue = Tissue.objects.get(id=request.data.get('tissue'))
if request.query_params.get('proteins'):
ids = json.loads(request.query_params.get('proteins'))
if request.data.get('proteins'):
ids = json.loads(request.data.get('proteins'))
proteins = list(Protein.objects.filter(id__in=ids).all())
elif request.query_params.get('token'):
elif request.data.get('token'):
proteins = []
task = Task.objects.get(token=request.query_params['token'])
task = Task.objects.get(token=request.data['token'])
result = task_result(task)
network = result['network']
node_attributes = result.get('node_attributes')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment