DNAnexus Documentation
APIDownloadsIndex of dx CommandsLegal
  • Overview
  • Getting Started
    • DNAnexus Essentials
    • Key Concepts
      • Projects
      • Organizations
      • Apps and Workflows
    • User Interface Quickstart
    • Command Line Quickstart
    • Developer Quickstart
    • Developer Tutorials
      • Bash
        • Bash Helpers
        • Distributed by Chr (sh)
        • Distributed by Region (sh)
        • SAMtools count
        • TensorBoard Example Web App
        • Git Dependency
        • Mkfifo and dx cat
        • Parallel by Region (sh)
        • Parallel xargs by Chr
        • Precompiled Binary
        • R Shiny Example Web App
      • Python
        • Dash Example Web App
        • Distributed by Region (py)
        • Parallel by Chr (py)
        • Parallel by Region (py)
        • Pysam
      • Web App(let) Tutorials
        • Dash Example Web App
        • TensorBoard Example Web App
      • Concurrent Computing Tutorials
        • Distributed
          • Distributed by Region (sh)
          • Distributed by Chr (sh)
          • Distributed by Region (py)
        • Parallel
          • Parallel by Chr (py)
          • Parallel by Region (py)
          • Parallel by Region (sh)
          • Parallel xargs by Chr
  • User
    • Login and Logout
    • Projects
      • Project Navigation
      • Path Resolution
    • Running Apps and Workflows
      • Running Apps and Applets
      • Running Workflows
      • Running Nextflow Pipelines
      • Running Batch Jobs
      • Monitoring Executions
      • Job Notifications
      • Job Lifecycle
      • Executions and Time Limits
      • Executions and Cost and Spending Limits
      • Smart Reuse (Job Reuse)
      • Apps and Workflows Glossary
      • Tools List
    • Cohort Browser
      • Chart Types
        • Row Chart
        • Histogram
        • Box Plot
        • List View
        • Grouped Box Plot
        • Stacked Row Chart
        • Scatter Plot
        • Kaplan-Meier Survival Curve
      • Locus Details Page
    • Using DXJupyterLab
      • DXJupyterLab Quickstart
      • Running DXJupyterLab
        • FreeSurfer in DXJupyterLab
      • Spark Cluster-Enabled DXJupyterLab
        • Exploring and Querying Datasets
      • Stata in DXJupyterLab
      • Running Older Versions of DXJupyterLab
      • DXJupyterLab Reference
    • Using Spark
      • Apollo Apps
      • Connect to Thrift
      • Example Applications
        • CSV Loader
        • SQL Runner
        • VCF Loader
      • VCF Preprocessing
    • Environment Variables
    • Objects
      • Describing Data Objects
      • Searching Data Objects
      • Visualizing Data
      • Filtering Objects and Jobs
      • Archiving Files
      • Relational Database Clusters
      • Symlinks
      • Uploading and Downloading Files
        • Small File Sets
          • dx upload
          • dx download
        • Batch
          • Upload Agent
          • Download Agent
    • Platform IDs
    • Organization Member Guide
    • Index of dx commands
  • Developer
    • Developing Portable Pipelines
      • dxCompiler
    • Cloud Workstation
    • Apps
      • Introduction to Building Apps
      • App Build Process
      • Advanced Applet Tutorial
      • Bash Apps
      • Python Apps
      • Spark Apps
        • Table Exporter
        • DX Spark Submit Utility
      • HTTPS Apps
        • Isolated Browsing for HTTPS Apps
      • Transitioning from Applets to Apps
      • Third Party and Community Apps
        • Community App Guidelines
        • Third Party App Style Guide
        • Third Party App Publishing Checklist
      • App Metadata
      • App Permissions
      • App Execution Environment
        • Connecting to Jobs
      • Dependency Management
        • Asset Build Process
        • Docker Images
        • Python package installation in Ubuntu 24.04 AEE
      • Job Identity Tokens for Access to Clouds and Third-Party Services
      • Enabling Web Application Users to Log In with DNAnexus Credentials
      • Types of Errors
    • Workflows
      • Importing Workflows
      • Introduction to Building Workflows
      • Building and Running Workflows
      • Workflow Build Process
      • Versioning and Publishing Global Workflows
      • Workflow Metadata
    • Ingesting Data
      • Molecular Expression Assay Loader
        • Common Errors
        • Example Usage
        • Example Input
      • Data Model Loader
        • Data Ingestion Key Steps
        • Ingestion Data Types
        • Data Files Used by the Data Model Loader
        • Troubleshooting
      • Dataset Extender
        • Using Dataset Extender
    • Dataset Management
      • Rebase Cohorts and Dashboards
      • Assay Dataset Merger
      • Clinical Dataset Merger
    • Apollo Datasets
      • Dataset Versions
      • Cohorts
    • Creating Custom Viewers
    • Client Libraries
      • Support for Python 3
    • Walkthroughs
      • Creating a Mixed Phenotypic Assay Dataset
      • Guide for Ingesting a Simple Four Table Dataset
    • DNAnexus API
      • Entity IDs
      • Protocols
      • Authentication
      • Regions
      • Nonces
      • Users
      • Organizations
      • OIDC Clients
      • Data Containers
        • Folders and Deletion
        • Cloning
        • Project API Methods
        • Project Permissions and Sharing
      • Data Object Lifecycle
        • Types
        • Object Details
        • Visibility
      • Data Object Metadata
        • Name
        • Properties
        • Tags
      • Data Object Classes
        • Records
        • Files
        • Databases
        • Drives
        • DBClusters
      • Running Analyses
        • I/O and Run Specifications
        • Instance Types
        • Job Input and Output
        • Applets and Entry Points
        • Apps
        • Workflows and Analyses
        • Global Workflows
        • Containers for Execution
      • Search
      • System Methods
      • Directory of API Methods
      • DNAnexus Service Limits
  • Administrator
    • Billing
    • Org Management
    • Single Sign-On
    • Audit Trail
    • Integrating with External Services
    • Portal Setup
    • GxP
      • Controlled Tool Access (allowed executables)
  • Science Corner
    • Scientific Guides
      • Somatic Small Variant and CNV Discovery Workflow Walkthrough
      • SAIGE GWAS Walkthrough
      • LocusZoom DNAnexus App
      • Human Reference Genomes
    • Using Hail to Analyze Genomic Data
    • Open-Source Tools by DNAnexus Scientists
    • Using IGV Locally with DNAnexus
  • Downloads
  • FAQs
    • EOL Documentation
      • Python 3 Support and Python 2 End of Life (EOL)
    • Automating Analysis Workflow
    • Backups of Customer Data
    • Developing Apps and Applets
    • Importing Data
    • Platform Uptime
    • Legal and Compliance
    • Sharing and Collaboration
    • Product Version Numbering
  • Release Notes
  • Technical Support
  • Legal
Powered by GitBook

Copyright 2025 DNAnexus

On this page
  • Path Syntax
  • Project Paths
  • Job-Based Object References (JBORs)
  • DNAnexus Links
  • Special Characters
  • Name Conflicts

Was this helpful?

Export as PDF
  1. User
  2. Projects

Path Resolution

Last updated 2 years ago

Was this helpful?

When using the command-line client, you may refer to objects either through their ID or by name.

In the DNAnexus platform, every data object has a unique starting with the class of the object (e.g. "record", "file", "project") followed by a hyphen ('-') and 24 alphanumberic characters, e.g. record-9zGPKyvvbJ3Q3P8J7bx00005. A string matching this format will always be interpreted to be meant as the ID of such an object and will not be further resolved as a name.

The command-line client, however, also accepts names and paths as input in a particular syntax.

Path Syntax

There are three main types of paths that are recognized for referring to data objects: project paths, job-based object references (JBORs), and DNAnexus links.

Project Paths

To refer to a project by name, it must be suffixed with the colon character ":". Anything appearing after the ":" or without a ":" will be interpreted as a folder path to a named object. For example, to refer to a file called "hg19.fq.gz" in a folder called "human" in a project called "Genomes", the following path can be used in place of its object ID:

Genomes:human/hg19.fa.gz

Note that the folder path appearing after the ":" is assumed to be relative to the root folder "/" of the project.

Exceptions to this are when commands take in arbitrary names (e.g. for which takes in app names, user IDs, etc.). In this case, all possible interpretations will be attempted. However, it will always be assumed that it is not a project name unless it ends in ":".

Job-Based Object References (JBORs)

To refer to the output of a particular job, you can use the syntax <job id>:<output name>.

Examples

If you have the job ID handy, you can use it directly.

$ dx describe job-B0kK3p64Zg2FG1J75vJ00004:reads

Or if you know it's the last analysis you ran:

$ dx describe $(dx find jobs -n 1 --brief):reads

You can also automatically download a file once the job producing it is done:

$ dx download $(dx run some_exporter_app -iinput=my_input -y --brief --wait):file_output

If the output is an array, you can extract a single element by specifying its array index (numbered 0, 1, etc.) as follows:

$ dx describe job-B0kK3p64Zg2FG1J75vJ00004:reads.0

DNAnexus Links

DNAnexus links are JSON hashes which are used for job input and output. They always contain one key, $dnanexus_link, and have as a value either

  • a string representing a data object ID

  • another hash with two keys:

    • project a string representing a project or other data container ID

    • id a string representing a data object ID

For example:

$ dx ls '{"$dnanexus_link": "file-B2VBGXyK8yjzxF5Y8j40001Y"}'
file-name

Special Characters

Because of the use of : to denote project names and of / to separate folder names, they must be escaped with a preceding backslash \\ when they appear in a data object's name. The characters * and ? are also reserved for the use in wildcard patterns and must also be escaped. Depending on your terminal and whether you put the entire name or path in quotes, you may have to additionally escape spaces in order to pass them in as part of the string. The use of backslashes in names is discouraged, and the best way to interact with objects with such names will probably be to use their IDs directly. See the following table for some examples of the necessary representation for accessing existing objects with special characters in their names (assuming a bash shell).

Character

Escaped version (no quotes)

Escaped version (with quotes)

`` (single space)

' '

:

\\\\:

'\\:'

/

\\\\/

'\/'

*

\\\\\\\\*

'\\\\\\*'

?

\\\\\\\\?

'\\\\\\?'

The following example illustrates how the special characters are escaped for use on the command line, with and without quotes.

$ dx ls Project\ Mouse:
name: with/special*characters?
$ dx cd Project\ Mouse:
$ dx describe name\\\\:\ with\\\\/special\\\\\\\\*characters\\\\\\\\?
ID              file-9zz0xKJkf6V4yzQjgx2Q006Y
Class           file
Project         project-9zb014Jkf6V33pgy75j0000G
Folder          /
Name            name: with/special*characters?
State           closed
Hidden          visible
Types           -
Properties      -
Tags            -
Outgoing links  -
Created         Wed Jul 11 16:39:37 2012
Created by      alice
Last modified   Sat Jul 21 14:19:55 2012
Media type      text/plain
Size (bytes)    4
$ dx describe "name\: with\/special\\\\\\*characters\\\\\\?"
...

For commands where the argument supplied involves naming or renaming something, the only escaping necessary is whatever is necessary for your shell or for setting it apart from a project or folder path.

$ dx new record -o "must\: escape\/everything\*once\?at creation"
ID              record-B13BBVK4Zg29fvVv08q00005
...
Name            must: escape/everything*once? at creation
...
$ dx rename record-B13BBVK4Zg29fvVv08q00005 "no:escaping/necessary*even?wildcards"

Name Conflicts

It is possible to have multiple objects with the same name in the same folder. When an attempt is made to access or modify an object which shares the same name as another object, you will be prompted to select the desired data object.

$ dx ls
sample : file-9zbpq72y8x6F0xPzKZB00003
sample : file-9zbjZf2y8x61GP1199j00085
$ dx mv sample mouse_sample
The given path "sample" resolves to the following data objects:
0) closed  2012-06-27 18:04:28 sample (file-9zbpq72y8x6F0xPzKZB00003)
1) closed  2012-06-27 15:34:00 sample (file-9zbjZf2y8x61GP1199j00085)

Pick a numbered choice or "*" for all: 1
$ dx ls -l
closed  2012-06-27 15:34:00 mouse_sample (file-9zbjZf2y8x61GP1199j00085)
closed  2012-06-27 18:04:28 sample (file-9zbpq72y8x6F0xPzKZB00003)

Some commands (like mv here) will allow you to enter * so that all matches will be used. Other commands may automatically apply the command to all of them (e.g. ls and describe), and others will require that exactly one object be chosen (e.g. run).

ID
dx describe