dx runis 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.
‑‑inputflags 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/‑‑inputflag, 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).
‑i/‑‑inputflag 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).
-iflag with syntax
‑i<input name>=<job id>:<output name>. Combined with the
--briefflag (which allows
dx runto output just the job ID) and the
-yflag (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 runare listed below.
dx runwill 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
--briefflag which tells
dxto print out only the job ID instead. This job ID can then be saved.
TIP: When running jobs, you can use the
-y/--yesoption 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
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-xxxxflag will copy the applet, instance type, and inputs, it will not copy usage of the
--debug-onflags. These will have to be re-specified for each job run. For more information, see the Connecting to Jobs page.
--destinationflag 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
--destination project-xxxx:/mappingsinstructs the job to output all results into the "mappings" folder of project-xxxx.
dx run --instance-typecommand 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.
--propertyflag allows you to attach a property to a job, and the
--tagflag allows you to tag a job.
--watchflag to ask the job to print its logs in your terminal window as it progresses.
‑j/‑‑input‑jsonfollowed 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‑filefollowed by the name of the JSON file.
-fflag 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 --helpcommand 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
--cost-limit cost_limitsets 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 --helpcommand for more information.