App Metadata
The file
dxapp.json
is a DNAnexus application metadata file. Its presence in a directory tells DNAnexus tools that this directory contains DNAnexus app source code. The file's format is defined by convention and operationally by DNAnexus tools that use it (usually invoked through dx build
and dx build --create-app
).The format of the file closely resembles that of the corresponding calls to
/applet/new
and /app/new
, except for some differences as noted below. Fields found in dxapp.json
but not recognized by the build tools are passed through to the API methods.The next section is a detailed example showing most of the commonly used fields.
The following lists the contents of an example
dxapp.json
to be provided in a directory for use with the dx build
command. For fields that are marked for apps only, it is harmless to provide them when building applets; they will simply only take effect when building apps.Note that comments as shown below are not valid in the JSON format but are provided here for easy reference.
{
"name": "mapper", # Simple name; cannot be changed across versions of an app
"title": "Simple Read Mapper", # Human-readable name (shown on the App's page and used as the default
# job name)
"summary": "Maps reads to a genome", # One-liner description of what the app(let) does
"description": "This app...", # (optional) Longer description of what the app(let) does; if not
# provided, dx build will inline the Readme.md file if available
"developerNotes": "...", # (optional) Detailed notes covering extra details; if not provided,
# dx build will inline the Readme.developer.md file if available
"details": { # (optional) This can contain arbitrary metadata, but there are some
"contactEmail": "[email protected]" # key/value pairs that are recognized as conventions by the website
}, # when rendering your app, e.g. for displaying contact information
"dxapi": "1.0.0", # The version of the API that your app uses
"version": "0.0.1", # Apps only: version of the app that is being built
"categories": ["Read Mapping"], # (optional) Apps only: list of categories describing the app (see
# below for a list of recognized categories)
"inputSpec": [ # Input specification (see API documentation)
# An array:int input "1,2,3" would be launched with the input [1, 2, 3]
# An array:strin "1,2,3" would be launched with the input ["1", "2", "3"]
{
"name": "reads",
"class": "file",
"patterns": ["*.fastq", "*.fastq.gz"],
"help": "Input FASTQ files ... ",
"optional": false
},
{
"name": "genomeindex_targz",
"label": "BWA reference genome index",
"help": "A file ...",
"class": "file",
"patterns": ["*.bwa-index.tar.gz"],
"suggestions": [
{
"name": "DNAnexus Reference Genomes",
"project": "project-BQpp3Y804Y0xbyG4GJPQ01xv",
"path": "/"
}
],
"optional": false
},
{
"name": "reads_type",
"class": "string",
"default": "paired-end",
"choices": ["single-end", "paired-end"],
"group": "Advanced Options"
}
],
"outputSpec": [ # Output specification (see API documentation)
{
"name": "mappings",
"class": "file",
"patterns": ["*.bam"]
}
],
"runSpec": { # Run specification (for more details, see the API documentation)
"interpreter": "python3", # Either "bash" or "python3" to indicate the interpreter for which
# the script in "file" was written
"file": "src/mapper.py", # Path to the script that will be run when this app(let) is run
"headJobOnDemand": true # (optional) Whether headJobOnDemand is enabled by default for this applet or app..
# Can be overridden at runtime.
"restartableEntryPoints": "all", # All entry points may be restarted if a restartable error occurs
"assetDepends": [
{
"id": "record-Bq320600kXGxY7PyB43GZ69j"
# Asset bundle record ID
},
{
"name": "qiime_asset", # (optional) Asset bundle record name
"version": "0.0.1", # (optional) Asset bundle record version number
"project": "project-Bq1pqV00kXGgzp45j4jGyYY7",
# (optional) ID of the project containing the asset bundle record
"folder": "/records" # (optional) Folder in the project containing the asset bundle record.
} # By default the folder is "/"
],
"systemRequirements": { # (optional, deprecated, moved to "regionalOptions") Request different
# instance types for different entry points
"main": { # "main" here is the name of the entry point that is called when an
"instanceType": "mem1_ssd1_x4" # app(let) is run
},
"process": { # "process" is the name of an entry point (used when spawning a new job
# via /job/new that runs the function called "process")
"instanceType": "mem3_ssd2_fpga1_x8",
"fpgaDriver": "edico-1.4.5" # fpga driver to install on fpga instances
},