dx run
. The inputs to these app(let)s can be from any project for which you have VIEW access. Or run from UI.​dx run
is run without specifying any inputs, interactive mode will be launched. When you run this command, the platform prompts you for each required input, followed by a prompt to set any optional parameters. As shown below using the BWA-MEM FASTQ Read Mapper app (platform login required to access this link), after you are done entering inputs, you must confirm that you want the applet/app to be run with the inputs you have selected.‑i
or ‑‑input
flags with syntax ‑i<input name>=<input value>
. Names of data objects in your project will be resolved to the appropriate IDs and packaged correctly for the API method as shown below.‑i/‑‑input
flag, you must use the input field names (not to be confused with their human-readable labels). To look up the input field names for an app, applet, or workflow, you can run the command dx run app(let)-xxxx -h
, as shown below using the Swiss Army Knife app (platform login required to access this link).-iin=file-xxxx
and icmd=<string>
, respectively.‑i/‑‑input
flag for each input in the array and each file specified will be appended into an array in same order as it was entered on the command line. Below is an example of how to use the Swiss Army Knife app to index multiple BAM files (platform login required to access this link).-i
flag with syntax ‑i<input name>=<job id>:<output name>
. Combined with the --brief
flag (which allows dx run
to output just the job ID) and the -y
flag (to skip confirmation), you can string together two jobs using one command.dx run app-bwa_mem_fastq_read_mapper -h
. The "sorted_bam" output will then be used as input for the Swiss Army Knife app (platform login required to access this link).dx run
are listed below.dx run
will always print the exact input JSON with which it is calling the applet or app. If you don't want to print this verbose output, you can use the --brief
flag which tells dx
to print out only the job ID instead. This job ID can then be saved.TIP: When running jobs, you can use the-y/--yes
option to bypass the prompts asking you to confirm running the job and whether or not you want to watch the job. This is useful for scripting jobs. If you want to confirm running the job and immediately start watching the job, you can use-y --watch
.
--clone
flag.--clone job-xxxx
command to use the executable Swiss Army Knife app (platform login required to access this link) rather than that used by the job.dx run <executable> --clone job-xxxx [options]
. The command-line arguments you provide in [options]
will override the settings reused from --clone
. For example, this is useful if you want to rerun a job with the same executable and inputs but a different instance type, or if you want to run an executable with the same settings but slightly different inputs.NOTE: Though the--clone job-xxxx
flag will copy the applet, instance type, and inputs, it will not copy usage of the--allow-ssh
or--debug-on
flags. These will have to be re-specified for each job run. For more information, see the Connecting to Jobs page.
--destination
flag allows you to specify the full project-ID:/folder/
path in which to output the results of the app(let). If this flag is unspecified, the output of the job will default to the present working directory, which can be determined by running dx pwd
.--destination project-xxxx:/mappings
instructs the job to output all results into the "mappings" folder of project-xxxx.dx run --instance-type
command allows you to specify the instance type(s) to be used for the job. More information can be found by running the command dx run --instance-type-help
.--property
flag allows you to attach a property to a job, and the --tag
flag allows you to tag a job.--watch
flag to ask the job to print its logs in your terminal window as it progresses.‑j/‑‑input‑json
followed by the JSON in single quotes. Only single quotes should be used to wrap the JSON to avoid interfering with the double quotes used by the JSON itself.‑f/‑‑input‑json‑file
followed by the name of the JSON file.-f
flag with the small substitution of using "-"as the filename. Below is an example that demonstrates how to echo the input JSON to stdin and pipe the output to the input of dx run
. As before, single quotes should be used to wrap the JSON input to avoid interfering with the double quotes used by the JSON itself.dx run --help
command will show all of the flags available to use in conjunction with dx run
. The message printed by this command is identical to the one displayed in the brief description of dx run
.--cost-limit cost_limit
sets the maximum cost of the job before termination. In case of workflows it is cost of the entire analysis job. For batch run, this limit is applied per job. See the dx run --help
command for more information.