1

I have a simple python script that does something like this:

from apiclient import discovery
from oauth2client.client import GoogleCredentials
ggSvc = discovery.build ( 'genomics', 'v1', credentials=credentials )

body = { "readGroupSetIds": [readGroupSetId],
         "referenceName": args.chr,
         "start": args.pos-2,
         "end": args.pos+2,
         "pageSize": 256 }

r = ggSvc.reads().search ( body=body ).execute()

is it possible to do this from Datalab or is my best option to use the requests module and then construct and post the http request that way?

SheRey
  • 305
  • 1
  • 5
  • 15

1 Answers1

1

The following command will install the google api python client
!pip install google-api-python-client

You can also run commands using the %%bash cell magic option.

For example,

%%bash
pip install google-api-python-client
Anthonios Partheniou
  • 1,699
  • 1
  • 15
  • 25
  • 1
    thanks, I don't know why I wasn't thinking along those lines -- also I just found [this](https://github.com/googlegenomics/datalab-examples/blob/master/datalab/genomics/Getting%20started%20with%20the%20Genomics%20API.ipynb) googlegenomics example on github – SheRey Mar 13 '16 at 04:04