dx
command-line client is included in the DNAnexus SDK (dx-toolkit
). You can use the dx
client to log into the Platform; to upload, browse, and organize data; and to launch analyses.dx help
to see a list of commands, broken down by category. To see a list of commands from a particular category, enter dx help <category>
. dx help <command>
, dx <command> -h
, or dx <command> -help
For example, enter dx help ls
to learn about the command dx ls
:dx select
command and picking a project, you've now done the command-line equivalent of going to the project page for Reference Genome Files: AWS US (East) (platform login required to access this link) on the website. This is a DNAnexus-sponsored project containing popular genomes for you to use when running analyses with your own data.dx select
command, please see the Changing Your Current Project page.dx ls
. You can also see the contents of a folder by running the command dx ls <folder_name>
.dx ls C
and then pressing <TAB>
. The folder name will auto-complete from there.:
) and the folder path. Here, we list the contents of the publicly available project "Demo Data" using both its name and ID.-l
flag in conjunction with dx ls
to list more details about files, such as the time a file was last modified, its size (if applicable), and its full DNAnexus ID.dx describe
command to learn more about files and other objects on the platform. Given a DNAnexus object ID or name, dx describe
will return detailed information about the object in question. dx describe
will only return results for data objects to which you have access.new
command can also allow you to create other new data objects, including new orgs or users. Use the command dx help new
to see additional information. The full list of dx commands is provided here.dx upload
command or the Upload Agent if you have installed it. For the purposes of this tutorial, you can also download the file small-celegans-sample.fastq, which represents the first 25000 C. elegans reads from SRR070372. We will use this file again later to run through a sample analysis.small-celegans-sample.fastq
file into the current directory of the current project. The --wait
flag tells dx upload
to wait until it has finished uploading the data before returning the prompt and describing the result.--brief
, only the file ID (in the form of file-xxxx) will be printed to the terminal. Other dx
commands will also accept the --brief
flag and will also report only object IDs.dx head
command. By default, it prints the first 10 lines of the given file.-n
flag to ask for the first 12 lines (the first 3 reads) of the FASTQ file.dx download
command. This command will use the name of the file for the filename unless you specify your own with the -o
/--output
flag. In the example below, we download the same C. elegans file that we uploaded previously.dx find apps
. You will find the name of the app that you can use on the command line in the parentheses (underlined below).dx install
and check that it has been installed. While you do not always need to install an app to run it, you may find it useful as a bookmarking tool.dx run
. We will run it without any arguments; it will then prompt us for required and then optional arguments. Note that the reference file genomeindex_targz
for the C. elegans sample we are using is in a .tar.gz
format and can be found in the Reference Genome folder of the region your project is in.dx watch
to monitor jobs. The command will print out the log file of the job, including the STDOUT, STDERR, and INFO printouts.dx describe job-xxxx
to learn more about your job. If you don't know the job's ID, you can use the command dx find jobs
to list all the jobs run in the current project, along with the user who ran them, their status, and when they began.dx terminate
..bai
extension. You can refer to the output file by name or by the job that produced it using the syntax job-xxxx:<output field>
. Try it yourself with the job ID you got from calling the BWA-MEM app!dx run freebayes -h
.[]
) around the command-line syntax for each input. You'll notice that there are two required inputs that must be specified:sorted_bams
): A list of files with a .bam
extension.genome_fastagz
): A reference genome in FASTA format that has been gzipped.dx describe freebayes
for a more compact view of the input and output specifications. By default, it will hide the advanced input options, but you can view them using the --verbose
flag.-i
flag to specify inputs as suggested by the output of dx run freebayes ‑h
:genome_fastagz
: The ce10 genome in the Reference Genomes project.job-xxxx:<output field>
syntax we used earlier.-y
flag skips the input confirmation.dx wait
to wait for a job to finish. If we run the following command right after running the Freebayes app, it will show you the recent jobs only after the job has finished, as shown in the example below.dx
. As shown in some of the examples above, the --brief
flag can come in handy for scripting. A list of all dx
commands and flags is on the Index of dx Commands page.