Wellcome Trust Sanger Institute icon

NPG@Wellcome Trust Sanger Institute

presents

ranger, sentry and ranger-dalliance

Accessing server from an htsget-compatible command line client.

Using the service without requiring credentials

A server has been deployed which does not require any credentials to serve data. Example (curl does not understand the htsget protocol, but can get you through the first part of the request):

curl 'https://htsget.wtsi-npg-test.co.uk:9090/npg_ranger/ga4gh/sample/NA12878?referenceName=22&start=16101000&end=16102000&format=SAM'

You can try installing npg_ranger locally, then you can use the package's client to get data

npg_ranger_client 'https://htsget.wtsi-npg-test.co.uk:9090/npg_ranger/ga4gh/sample/NA12878?referenceName=22&start=16101000&end=16102000&format=SAM'

Using authentication and authorisation

Prerequisite: you should have an account you can use to authenticate with Google, since our test authorization server is configured to delegate user authentication to Google.

Step 1. Get an access token from sentry server (last url slash is important). Follow instructions on screen to authenticate and then click the 'Create a new token' button. The 'Copy' button next to the token string copies the token string to the clipboard. Authentication is valid for a very short time, please reload the page if you get an error message. The token is valid for one week.

Step 2. Use this token when accessing our resource server. Example (curl does not understand the htsget protocol, but can get you through the first part of the request):

curl -H'Authorization: Bearer XXXXXXXX' 'https://htsget.wtsi-npg-test.co.uk:10090/npg_ranger/authtoken/ga4gh/sample/NA12878?referenceName=22&start=16101000&end=16102000&format=SAM'

If you already tried installing the client you can create a file with the token you previously obtained and use it to access the server.

echo '{"token": "XXXXXXXX"}' > token_file.json # Replace XXXXXXXX with your token
npg_ranger_client --token_config=token_file.json 'https://htsget.wtsi-npg-test.co.uk:10090/npg_ranger/authtoken/ga4gh/sample/NA12878?referenceName=22&start=16101000&end=16102000&format=SAM'

Using experimental version of Dalliance as client

You can use "NA12878" to search for data (copy now and paste when required). Links will open in a new window/tab.

Without requiring credentials

Using Google to authenticate user. Session have been configured to be very short, if session expires reload the page.

Webcasts with examples:

Recorded terminal sessions

Installing ranger suite with npm (2:54)

Using npg_ranger client to stream data from Sanger's public service (1:04)

Using npg_ranger client together with credentials to access Sanger's public service which requires authentication/authorization (2:54)

Using npg_ranger client to stream data from Google's public servers (1:51)

Using a different client (python implementation) to access Sanger's public service (1:38)

Screencasts with some basic use of dalliance

Using Dalliance to access data from Sanger's server which does not require auth (2:00)

Using Google to authenticate. Using Dalliance to access data from Sanger's server. Individual requests are checked for authorisation using credentials in session (1:51)