10x Genomics Support/Cloud Analysis/Tutorials/

10x Genomics Cloud CLI Documentation for Windows

The 10x Genomics Cloud CLI is a command line interface (CLI) that allows you to upload FASTQ files to projects in your 10x Genomics account, create projects from the command line, and manage other tasks related to your 10x Genomics account.

It is an executable that can be run directly and requires no compilation or installation.

The steps are operating system dependent. Please select the tab for your operating system below to continue.

Download the 10x Genomics Cloud CLI for your operating system and unpack it to a convenient location. Your Documents folder is a good default location.

If you’re using a Windows system, download the latest version here:
10x Genomics Cloud CLI for Windows v1.3.1

Alternatively, open Command Prompt (cmd.exe) and use the command below to download:

curl -f -o txg-windows-v1.3.1.zip https://cf.10xgenomics.com/cloud-cli/v1.3.1/txg-windows-v1.3.1.zip

Below is a step-by-step video guide which demonstrates how to install and run commands in the 10x Genomics Cloud CLI for Windows operating systems.

To run the 10x Genomics Cloud CLI, you need to enter the path to the executable.

Option 1: You can navigate into the executable's directory, for example txg-windows-v1.3.1, and run the command from within the directory every time you want to run a command. For example:

cd C:/Documents/txg-windows-v1.3.1/ txg.exe help

Option 2: Or you can specify the full path to the executable every time you want to run a command. For example:

C:/Documents/txg-windows-v1.3.1/txg.exe help

Option 3: Or you can add the txg executable to your $PATH. This means you can type txg.exe [command] from anywhere to access the executable and run commands.

For instructions on adding files to $PATH on Windows, read more here.

txg.exe [command] [flags]

CommandDescription
analysesManage your analyses and download output files
authManage authentication
fastqsUpload and manage FASTQs
helpHelp about any command
projectsManage projects
referencesManage custom references

Global flags

The 10x Genomics Cloud CLI supports a number of flags for every command.

FlagsDescription
--access-token stringSpecify an access token to use. Default: the saved token from txg.exe auth setup.
-H, --header headerExtra header to include in the request when sending HTTP requests to a server. May be given multiple times to add multiple headers. Each header must be of the form 'Header: value'. Default: no extra headers.
-h, --helpDisplay help and exit.
-q, --quietDon't show progress or messages. Default: off.
-v, --verboseDisplay extra debugging information. Default: off.
--versionDisplay version and exit.

txg.exe auth [command]

CommandDescription
txg.exe auth resetDelete the saved access token (if it exists)
txg.exe auth setupSet up authentication. Interactively walk through the process of setting up authentication. Running this command will prompt you to visit the 10x Genomics Cloud Analysis site, copy your access token, and paste it here. The access token will then be saved locally and reused for subsequent requests.
txg.exe auth verifyVerify the stored access token is valid and that the 10x Genomics Cloud Analysis service can be successfully reached. Returns a zero exit code if successful, nonzero otherwise.

txg.exe fastqs upload --project-id PROJECT-ID [insert path to fastqs]

Upload FASTQ files to a project in your account. For detailed instructions on uploading FASTQ files to a project, view our tutorial here.

FlagsDescription
-n, --new-project stringCreate a new project with the specified name and immediately upload the FASTQs to it.
-p, --project-id idUpload the FASTQs to the project with the specified ID. The project ID is unique ID automatically created for each project. The project ID is provided in the upload command available in your project.

txg.exe fastqs list PROJECT-ID

List FASTQ files for the specified project ID. You can find the ID of a project by running txg projects list.

txg analyses download ANALYSIS-ID [flags]

Download output files from the specified analysis. If --file-id is not present, all non-expired output files will be downloaded. If --file-id is present, only the specified files will be downloaded.

By default, the files will be downloaded into the directory from which the command is run (typically the path/to/txg/ directory). To download to an alternate location, specify a file path using the --target-dir argument.

At this time, only free file downloads are supported via the 10x Genomics Cloud CLI. Any downloads beyond the free quota must be initiated via curlwget, or download in the web browser.

FlagsDescription
--file-id stringComma delimited list of file IDs (optional).
--target-dir stringTarget download directory (optional).

txg analyses files ANALYSIS-ID

View a list of all non-expired output files for the specified analysis.

txg analyses list PROJECT-ID

Display a list of your completed analyses for the specified project.

txg analyses get ANALYSIS-ID

Show the details of the specified analysis. You can find the analysis ID of your analyses by running txg analyses list.

txg.exe projects create --name NAME [--description DESC]

Create a new project with the specified name and optional description. The project name must be unique across all your projects.

FlagsDescription
--description stringProject description (optional).
--name stringProject name (required).

txg.exe projects list [flags]

Display a list of your projects, optionally sorted by a specific field.

FlagsDescription
--sort-by stringSort the list by the specified field, which must be one of: id, name, created. Default: unsorted.

txg.exe projects update PROJECT-ID [flags]

Update the name and/or description of the specified project. A project's ID can be displayed by running txg.exe projects list.

FlagsDescription
--description stringSet the project description.
--name stringSet the project name.

txg.exe references upload [insert path to reference directory]

Upload an uncompressed or compressed reference directory. For detailed instructions on uploading FASTQ files to a project, view our tutorial here.

FlagsDescription
--name stringSpecify a name for your custom reference. If not specified, the directory name will be used as the name. This can be changed after upload is completed.

txg.exe references delete REFERENCE-ID

Delete the specified custom reference. You can find the reference ID of your references by running txg.exe references list.

txg references get REFERENCE-ID

Show the details of the specified custom reference. You can find the reference ID of your references by running txg.exe references list.

txg.exe references list [FLAGS]

Display a list of your custom references, optionally sorted by a specific field.

FlagsDescription
--sort-by stringSort the list by the specified field, which must be one of: id, name, or created. Default: unsorted.

txg.exe references update REFERENCE-ID [FLAGS]

Update one or more metadata fields associated with your custom reference. You can find the ID of a reference by running txg.exe references list.

FlagsDescription
--build-notes stringSpecify how the custom reference was built (optional).
--description stringShort description (optional).
--name stringSet the reference name (required).
--organism stringScientific name of the organism followed by the common name in parentheses (optional).

``