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

add bio gpu demos #509

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 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
lmeyerov marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {
"scrolled": false
},
Expand All @@ -48,26 +48,26 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2717: DtypeWarning: Columns (19,20) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" interactivity=interactivity, compiler=compiler, result=result)\n"
"/var/folders/sx/x954rbdd44d932dd0ygfp1qc0000gn/T/ipykernel_51237/4214251102.py:2: DtypeWarning: Columns (19,20) have mixed types. Specify dtype option on import or set low_memory=False.\n",
" rawdata = pandas.read_table(url1, na_values=['-'], engine='c')#, compression='gzip')\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -134,14 +134,14 @@
"2 Wang T (1996) Low Throughput "
]
},
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url1 = 'https://s3-us-west-1.amazonaws.com/graphistry.demo.data/BIOGRID-ALL-3.3.123.tab2.txt.gz'\n",
"rawdata = pandas.read_table(url1, na_values=['-'], engine='c', compression='gzip')\n",
"url1 = 'http://thebiogrid.org/downloads/archives/Release%20Archive/BIOGRID-3.3.123/BIOGRID-ALL-3.3.123.tab2.zip'\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https

"rawdata = pandas.read_table(url1, na_values=['-'], engine='c')#, compression='gzip')\n",
"\n",
"# If using local data, comment the two lines above and uncomment the line below\n",
"# pandas.read_table('./data/BIOGRID-ALL-3.3.123.tab2.txt', na_values=['-'], engine='c')\n",
Expand All @@ -162,35 +162,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
lmeyerov marked this conversation as resolved.
Show resolved Hide resolved
{
"data": {
"text/html": [
"\n",
" <iframe id=\"59e1c841-c0e5-4b53-a0f7-29650ec2536f\" src=\"https://hub.graphistry.com/graph/graph.html?dataset=s3://graphistry.data/pygraphistry/50ad94358da9e7cb7924335eb336ce7a/dataset.json&type=jsonMeta&viztoken=081a2c85d68a5d175fdf33fe29297ed6fe724c99&usertag=86f11264-pygraphistry-0.9.63&splashAfter=1554614704&info=true\"\n",
" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"\n",
" oallowfullscreen=\"true\" msallowfullscreen=\"true\"\n",
" style=\"width:100%; height:500px; border: 1px solid #DDD\">\n",
" </iframe>\n",
" \n",
" <script>\n",
" $(\"#59e1c841-c0e5-4b53-a0f7-29650ec2536f\").bind('mousewheel', function(e) {\n",
" e.preventDefault();\n",
" });\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"g = graphistry.bind(source=\"BioGRID ID Interactor A\", destination=\"BioGRID ID Interactor B\")\n",
"g.plot(interactions.sample(10000))"
Expand All @@ -206,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"metadata": {
"scrolled": true
},
Expand All @@ -215,18 +189,18 @@
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -263,15 +237,15 @@
"22 3 Arabidopsis thaliana"
]
},
"execution_count": 4,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# This downloads 170 MB, it might take some time.\n",
"url2 = 'https://s3-us-west-1.amazonaws.com/graphistry.demo.data/BIOGRID-IDENTIFIERS-3.3.123.tab.txt.gz'\n",
"raw_proteins = pandas.read_table(url2, na_values=['-'], engine='c', compression='gzip')\n",
"url2 = 'http://thebiogrid.org/downloads/archives/Release%20Archive/BIOGRID-3.3.123/BIOGRID-IDENTIFIERS-3.3.123.tab.zip'\n",
"raw_proteins = pandas.read_table(url2, na_values=['-'], skiprows=28)#, engine='c', compression='gzip')\n",
"\n",
"# If using local data, comment the two lines above and uncomment the line below\n",
"# raw_proteins = pandas.read_table('./data/BIOGRID-IDENTIFIERS-3.3.123.tab.txt', na_values=['-'], engine='c')\n",
Expand All @@ -291,7 +265,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 10,
"metadata": {
"scrolled": true
},
Expand All @@ -300,18 +274,18 @@
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -348,7 +322,7 @@
"2 106605 ACVR1"
]
},
"execution_count": 5,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -375,25 +349,25 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -434,7 +408,7 @@
"2 106605 ACVR1 Homo sapiens"
]
},
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -453,7 +427,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -470,25 +444,25 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -538,7 +512,7 @@
"2 Homo sapiens 0 "
]
},
"execution_count": 8,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -557,7 +531,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 14,
"metadata": {
"scrolled": true
},
Expand All @@ -566,18 +540,18 @@
"data": {
"text/html": [
"<div>\n",
"<style>\n",
" .dataframe thead tr:only-child th {\n",
" text-align: right;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: left;\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
Expand Down Expand Up @@ -649,7 +623,7 @@
"2 Low Throughput "
]
},
"execution_count": 9,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -673,44 +647,11 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Uploading 7139 kB. This may take a while...\n"
]
},
{
"data": {
"text/html": [
lmeyerov marked this conversation as resolved.
Show resolved Hide resolved
"\n",
" <iframe id=\"083451dc-af48-4258-8c35-74f97130ea2e\" src=\"https://hub.graphistry.com/graph/graph.html?dataset=s3://graphistry.data/pygraphistry/7b876012458fc4c83644f88b14f96be5/dataset.json&type=jsonMeta&viztoken=0db9e5e57bbe115a40b64692dd5f2d7a5f2ec4a0&usertag=86f11264-pygraphistry-0.9.63&splashAfter=1554614820&info=true\"\n",
" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\"\n",
" oallowfullscreen=\"true\" msallowfullscreen=\"true\"\n",
" style=\"width:100%; height:500px; border: 1px solid #DDD\">\n",
" </iframe>\n",
" \n",
" <script>\n",
" $(\"#083451dc-af48-4258-8c35-74f97130ea2e\").bind('mousewheel', function(e) {\n",
" e.preventDefault();\n",
" });\n",
" </script>\n",
" "
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# This will upload ~10MB of data, be patient!\n",
"g2 = g.bind(node='BIOGRID_ID', edge_title='Author', point_title='SYMBOL', point_color='Color')\n",
Expand Down Expand Up @@ -743,7 +684,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.11"
"version": "3.12.2"
}
},
"nbformat": 4,
Expand Down
Loading
Loading