Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks #123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ output.report
uuids_list.txt

.python-version

*/.ipynb_checkpoints/
Binary file added jupyter_notebooks/Fig1-take2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added jupyter_notebooks/Fig1-take3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added jupyter_notebooks/Fig1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8,465 changes: 8,465 additions & 0 deletions jupyter_notebooks/encode-perspectives-release-fig.ipynb

Large diffs are not rendered by default.

664 changes: 664 additions & 0 deletions jupyter_notebooks/profiling/timing-tests-sno-33.ipynb

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions jupyter_notebooks/profiling/timing-tests-sno-33.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

# coding: utf-8

# In[1]:



# In[2]:

import sys
sys.path.append('..')
import qancode
import numpy as np
import pandas as pd


# In[3]:

#compare any two encoded instances here
qa = qancode.QANCODE(rc_url="https://test.encodedcc.org", prod_url='https://sno68-on-dev.demo.encodedcc.org/')


# In[4]:

res = qa.check_response_time(item_types=["/","/search/?type=Experiment"], n=50)


# In[5]:

res


# In[6]:

qa.check_response_time(item_types=["/search/?searchTerm=K562", "/search/?searchTerm=DNA+binding", "/search/?searchTerm=human", "/search/?searchTerm=H3K36me3", "/search/?searchTerm=CTCF"], n=50)


# In[7]:

qa.check_response_time(item_types=['/ENCSR255XZG/', '/ENCSR749ILN/', '/ENCSR688GVV/', '/ENCSR301HAG/','/ENCSR315NAC/', '/ENCSR856JJB/'], n=50)


# In[8]:

qa.check_response_time(item_types=['/experiments/ENCSR255XZG/', '/experiments/ENCSR749ILN/', '/experiments/ENCSR688GVV/', '/experiments/ENCSR301HAG/','/experiments/ENCSR315NAC/', '/experiments/ENCSR856JJB/'], n=50)


# In[10]:

qa.check_response_time(json=True, item_types=['/ENCSR255XZG/', '/ENCSR749ILN/', '/ENCSR688GVV/', '/ENCSR301HAG/','/ENCSR315NAC/', '/ENCSR856JJB/'], n=50)


# In[ ]:

qa.check_response_time(item_types=['/ENCSR480OHP/','/ENCSR000EMB/','/ENCSR323QIP/','/ENCSR718AXQ/','/ENCSR165BGV/','/ENCSR384KAN/','/ENCSR330FXL/','/ENCSR825UNV/'], n=50)


# In[ ]:

qa.check_response_time(item_types=['/ENCAB830JLB/','/ENCAB000BKR/','/ENCAB284TTY/','/ENCAB294YUD/','/ENCAB000AOC/','/ENCAB301QZF/','/ENCAB000ANM/','/ENCAB000ANU/','/ENCAB445KMF/','/ENCAB000BAY/'], n=50)


# In[ ]:

qa.check_response_time(item_types=['/ENCBS787TFV/','/ENCBS676QAV/','/ENCBS996IWU/','/ENCBS913XJP/','/ENCBS565NTN/','/ENCBS896YZO/','/ENCBS280NYD/'], n=50)


# ##
279 changes: 279 additions & 0 deletions jupyter_notebooks/profiling/v79rc1 vs v77-test.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append('../..')\n",
"import qancode"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#comparing to v65rc2 site\n",
"qa = qancode.QANCODE(rc_url=\"https://v79rc1-master.demo.encodedcc.org/\", prod_url=\"https://test.encodedcc.org/\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Checking response time\n",
"\n",
"*** item_type: /\n",
"------------------------- https://test.encodedcc.org// -------------------------\n",
"\u001b[36mAverage es_time: 2.443 ± 1.396 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.509 ± 0.021 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 5.237 ± 1.01 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage wsgi_time: 11.828 ± 1.797 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage total time: 20.017 ± 3.473 ms (n=100)\u001b[0m\n",
"------------------ https://v79rc1-master.demo.encodedcc.org// ------------------\n",
"\u001b[36mAverage es_time: 2.038 ± 0.241 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.361 ± 0.032 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 3.991 ± 0.732 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage wsgi_time: 9.506 ± 0.798 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage total time: 15.895 ± 1.532 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /search/?type=Experiment\n",
"------------- https://test.encodedcc.org//search/?type=Experiment --------------\n",
"\u001b[31mAverage es_time: 24.699 ± 10.871 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.507 ± 0.023 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 140.946 ± 11.738 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 182.266 ± 17.143 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage total time: 348.418 ± 34.2 ms (n=100)\u001b[0m\n",
"------ https://v79rc1-master.demo.encodedcc.org//search/?type=Experiment -------\n",
"\u001b[31mAverage es_time: 22.949 ± 10.685 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.475 ± 0.019 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 123.067 ± 14.795 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 162.2 ± 20.174 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage total time: 308.692 ± 40.393 ms (n=100)\u001b[0m\n",
"\n"
]
}
],
"source": [
"qa.check_response_time(item_types=[\"/\",\"/search/?type=Experiment\"], n=100)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Checking response time\n",
"\n",
"*** item_type: /search/?searchTerm=K562\n",
"------------- https://test.encodedcc.org//search/?searchTerm=K562 --------------\n",
"\u001b[31mAverage es_time: 250.489 ± 48.89 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.531 ± 0.02 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 33.264 ± 10.438 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 296.063 ± 52.472 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 580.347 ± 102.992 ms (n=100)\u001b[0m\n",
"------ https://v79rc1-master.demo.encodedcc.org//search/?searchTerm=K562 -------\n",
"\u001b[31mAverage es_time: 208.883 ± 35.957 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.437 ± 0.018 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 23.045 ± 6.471 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 239.354 ± 37.294 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 471.72 ± 74.319 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /search/?searchTerm=DNA+binding\n",
"---------- https://test.encodedcc.org//search/?searchTerm=DNA+binding ----------\n",
"\u001b[31mAverage es_time: 352.991 ± 54.339 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.531 ± 0.025 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 34.168 ± 10.722 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage wsgi_time: 401.306 ± 58.61 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 788.996 ± 115.49 ms (n=100)\u001b[0m\n",
"--------- https://v79rc1-master.demo.encodedcc.org//search/?searchTerm=DNA+binding ---------\n",
"\u001b[31mAverage es_time: 309.012 ± 50.516 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.442 ± 0.02 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 25.838 ± 6.634 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 345.825 ± 51.697 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 681.117 ± 102.851 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /search/?searchTerm=human\n",
"------------- https://test.encodedcc.org//search/?searchTerm=human -------------\n",
"\u001b[31mAverage es_time: 249.505 ± 31.124 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.525 ± 0.027 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 29.964 ± 8.021 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 287.351 ± 32.164 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 567.346 ± 64.18 ms (n=100)\u001b[0m\n",
"------ https://v79rc1-master.demo.encodedcc.org//search/?searchTerm=human ------\n",
"\u001b[31mAverage es_time: 212.92 ± 32.219 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.438 ± 0.023 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 24.804 ± 6.531 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 244.6 ± 35.275 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 482.762 ± 70.465 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /search/?searchTerm=H3K36me3\n",
"----------- https://test.encodedcc.org//search/?searchTerm=H3K36me3 ------------\n",
"\u001b[31mAverage es_time: 248.062 ± 24.424 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.539 ± 0.023 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 38.939 ± 10.035 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 295.371 ± 28.084 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 582.911 ± 56.039 ms (n=100)\u001b[0m\n",
"---- https://v79rc1-master.demo.encodedcc.org//search/?searchTerm=H3K36me3 -----\n",
"\u001b[31mAverage es_time: 212.122 ± 23.738 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.441 ± 0.021 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 27.224 ± 6.081 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 247.042 ± 25.751 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 486.828 ± 51.462 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /search/?searchTerm=CTCF\n",
"------------- https://test.encodedcc.org//search/?searchTerm=CTCF --------------\n",
"\u001b[31mAverage es_time: 254.143 ± 28.335 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.522 ± 0.02 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 27.405 ± 7.011 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 289.241 ± 30.306 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 571.311 ± 60.455 ms (n=100)\u001b[0m\n",
"------ https://v79rc1-master.demo.encodedcc.org//search/?searchTerm=CTCF -------\n",
"\u001b[31mAverage es_time: 212.717 ± 28.256 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.431 ± 0.023 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 22.226 ± 6.054 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 241.854 ± 29.208 ms (n=100)\u001b[0m\n",
"\u001b[31mAverage total time: 477.229 ± 58.347 ms (n=100)\u001b[0m\n",
"\n"
]
}
],
"source": [
"qa.check_response_time(item_types=[\"/search/?searchTerm=K562\", \"/search/?searchTerm=DNA+binding\", \"/search/?searchTerm=human\", \"/search/?searchTerm=H3K36me3\", \"/search/?searchTerm=CTCF\"], n=100)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Checking response time\n",
"\n",
"*** item_type: /ENCSR255XZG/\n",
"------------------- https://test.encodedcc.org//ENCSR255XZG/ -------------------\n",
"\u001b[31mAverage es_time: 13.068 ± 2.72 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.475 ± 0.031 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 114.842 ± 4.813 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 221.894 ± 103.95 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage total time: 350.278 ± 104.227 ms (n=100)\u001b[0m\n",
"------------ https://v79rc1-master.demo.encodedcc.org//ENCSR255XZG/ ------------\n",
"\u001b[31mAverage es_time: 13.003 ± 5.506 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.486 ± 0.043 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 135.871 ± 104.913 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage wsgi_time: 233.545 ± 126.217 ms (n=100)\u001b[0m\n",
"\u001b[33mAverage total time: 382.906 ± 224.928 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /ENCSR749ILN/\n",
"------------------- https://test.encodedcc.org//ENCSR749ILN/ -------------------\n",
"\u001b[36mAverage es_time: 6.697 ± 3.32 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.477 ± 0.047 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 35.722 ± 6.491 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage wsgi_time: 61.932 ± 9.362 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage total time: 104.827 ± 16.282 ms (n=100)\u001b[0m\n",
"------------ https://v79rc1-master.demo.encodedcc.org//ENCSR749ILN/ ------------\n",
"\u001b[36mAverage es_time: 6.561 ± 2.738 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage queue_time: 0.462 ± 0.025 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage render_time: 31.747 ± 5.352 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage wsgi_time: 56.845 ± 6.371 ms (n=100)\u001b[0m\n",
"\u001b[36mAverage total time: 95.615 ± 12.547 ms (n=100)\u001b[0m\n",
"\n",
"\n",
"*** item_type: /ENCSR688GVV/\n",
"------------------- https://test.encodedcc.org//ENCSR688GVV/ -------------------\n"
]
}
],
"source": [
"qa.check_response_time(item_types=['/ENCSR255XZG/', '/ENCSR749ILN/', '/ENCSR688GVV/', '/ENCSR301HAG/','/ENCSR315NAC/', '/ENCSR856JJB/'], n=100)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": true
},
"outputs": [],
"source": [
"qa.check_response_time(item_types=['/ENCSR480OHP/','/ENCSR000EMB/','/ENCSR323QIP/','/ENCSR718AXQ/','/ENCSR165BGV/','/ENCSR384KAN/','/ENCSR330FXL/','/ENCSR825UNV/','/ENCSR089EOA/'], n=100)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"qa.check_response_time(item_types=['/ENCAB830JLB/','/ENCAB000BKR/','/ENCAB284TTY/','/ENCAB294YUD/','/ENCAB000AOC/','/ENCAB301QZF/','/ENCAB000ANM/','/ENCAB000ANU/','/ENCAB445KMF/','/ENCAB000BAY/'], n=100)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"qa.check_response_time(item_types=['/ENCBS787TFV/','/ENCBS676QAV/','/ENCBS996IWU/','/ENCBS913XJP/','/ENCBS565NTN/','/ENCBS896YZO/','/ENCBS280NYD/'], n=100)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}