Usage Examples

DNAstack products can be accessed programmatically through the Command Line Interface (CLI) for Windows, Mac, and Linux environments.

For installation instructions, see Overview and installation


Set up a service registry

You can easily set up your environment by using the dnastack use command. For example, we set up the CLI to work with the service endpoints available at

dnastack use

Download Files / Blobs

dnastack files download [DRS-URL] 

Arguments: DRS-URL: A DRS URL of the resource you would like to download


dnastack files download drs:// faux-blob-id-002


List Collections

dnastack collections list

List Collection Items

You can list all items in a particular collection with dnastack collections list-items -c SLUG_NAME where SLUG_NAME is the slug name of the collection. Here is an example.

dnastack collections list-items -c ncbi-sra

where items can be tables or blobs/files.

Query a Collection Table

dnastack collections query -c [SLUG-NAME] [COLLECTION-QUERY]

Arguments: SLUG-NAME: The name of the collection to query against COLLECTION-QUERY: The SQL query to execute


dnastack collections query -c ncbi-sra "SELECT * FROM collections.ncbi_sra.variants LIMIT 10"

Alternatively, you can run the following query:

dnastack data-connect query --endpoint-id data-connect-ncbi-sra 
"SELECT * FROM collections.ncbi_sra.variants LIMIT 10"

Additional Resources

Take a look at the GA4GH Data Connect Documentation for a detailed guide on using search commands.


See the workbench reference for usage examples

Last updated

© DNAstack. All rights reserved.