Exporting a Mosaic app to DNAnexus

Applications on the Mosaic platform can be exported to the DNAnexus core platform - but there are some limitations and differences that need to be understood.

Differences between Mosaic and DNAnexus apps

DNAnexus has apps (which exist outside of a workspace) and applets (which exist as a file object inside a workspace). An exported Mosaic app becomes an app on DNAnexus.

DNAnexus does not natively support the runs and studies data objects which are present on Mosaic. In order to export a Mosaic app to DNAnexus, ensure that it doesn’t use runs or studies as I/O.

The compute cost for running an app on Mosaic is charged to the account that submits the job. In order to ensure that the app user is billed on DNAnexus, apps must belong to the user who exports them. If a Mosaic user wishes to export a public Mosaic app to DNAnexus, they must create a forked copy.

While Mosaic apps are built using the web UI, and can be edited through that same UI, DNAnexus apps are built using a command-line SDK, based on a specific folder and file structure. This means that any exported Mosaic app can only be edited on DNAnexus through the command line.

How to export a Mosaic app to DNAnexus

Exporting a Mosaic application to become a DNAnexus applet is fairly straightforward:

  1. If the Mosaic app was created by another user, fork the app to create your own copy.
  2. If the Mosaic app uses either runs or studies as input or output, change this to any combination of files, arrays, strings, or Boolean inputs/outputs.
  3. On the app page, select “To DNAnexus” from the drop-down Export menu.
  4. You will be redirected to DNAnexus, where you grant Mosaic permission to export the app to your account. Select “Grant access” to continue.
  5. You will be returned to Mosaic, where you’re prompted to enter a token. This token can be generated on the DNAnexus platform under Profile -> API Tokens: https://platform.dnanexus.com/profile/Westwise/tokens . Note that the generated token can be viewed only upon creation, and can never be re-accessed; it’s recommended that you copy this token down to a secure location.
  6. Upon entering the token on the Mosaic site, clicking Proceed will export the Mosaic app to DNAnexus. You may click the blue button labeled “Go to app” to view the app on the DNAnexus platform.
Working with exported apps on DNAnexus

Apps that are exported from Mosaic to DNAnexus are unpublished. This means that they won’t show up in the apps list, and can’t be run except directly from the app page, or through the command line interface (CLI).

If you lose track of your exported apps and need to see them, you can use the DNAnexus SDK to run the following command from the command line:

dx find apps --unpublished --developer [DNAnexus username] --verbose

This will provide a list of all apps that are unpublished under your DNAnexus username; the app-ID can then be used to access and/or run the app, either from the command line or from the web UI.

Running and editing apps on DNAnexus

Once exported, an app on DNAnexus may be run either through the web UI or from the command line. Editing the app on DNAnexus is not performed through a web UI, as it is on Mosaic; instead, the app’s scripts and resources are downloaded to a local or cloud machine, edited, and then the app is built using the DNAnexus SDK.

Just like running normal apps on DNAnexus, the costs for compute resources will be billed to the account that runs the app.

For more information on editing apps on DNAnexus, consult the DNAnexus documentation.