Public Member Functions | List of all members
dx::DXApplet Class Reference
Inheritance diagram for dx::DXApplet:

Public Member Functions

 DXApplet (const char *dxid, const char *proj=NULL)
 DXApplet (const std::string &dxid, const std::string &proj=config::CURRENT_PROJECT())
 DXApplet (const dx::JSON &dxlink)
void create (dx::JSON inp)
DXJob run (const dx::JSON &applet_input, const std::string &output_folder="/", const std::vector< std::string > &depends_on=std::vector< std::string >(), const dx::JSON &instance_type=dx::JSON(dx::JSON_NULL), const std::string &project_context=config::CURRENT_PROJECT()) const
DXApplet clone (const std::string &dest_proj_id, const std::string &dest_folder="/") const
dx::JSON get () const
- Public Member Functions inherited from dx::DXDataObject
 DXDataObject (const DXDataObject &to_copy)
 DXDataObject (const std::string &dxid)
 DXDataObject (const std::string &dxid, const std::string &proj)
std::string getID () const
 operator std::string ()
std::string getProjectID () const
virtual void setIDs (const std::string &dxid, const std::string &proj="default")
virtual void setIDs (const char *dxid, const char *proj=NULL)
virtual void setIDs (const JSON &dxlink)
JSON describe (bool incl_properties=false, bool incl_details=false) const
void addTypes (const JSON &types) const
void removeTypes (const JSON &types) const
JSON getDetails () const
void setDetails (const JSON &details) const
void hide () const
void unhide () const
void rename (const std::string &name) const
void setProperties (const JSON &properties) const
JSON getProperties () const
void addTags (const JSON &tags) const
void removeTags (const JSON &tags) const
virtual void close () const
JSON listProjects () const
void move (const std::string &dest_folder) const
void remove ()

Additional Inherited Members

- Protected Member Functions inherited from dx::DXDataObject
void waitOnState (const std::string &state="closed", const int timeout=std::numeric_limits< int >::max()) const
virtual void addTypes_ (const std::string &input_params) const =0
virtual void removeTypes_ (const std::string &input_params) const =0
virtual void setDetails_ (const std::string &input_params) const =0
virtual void setVisibility_ (const std::string &input_params) const =0
virtual void close_ (const std::string &input_params) const =0
void clone_ (const std::string &dest_proj_id, const std::string &dest_folder) const
- Protected Attributes inherited from dx::DXDataObject
std::string dxid_
std::string proj_

Constructor & Destructor Documentation

dx::DXApplet::DXApplet ( const char *  dxid,
const char *  proj = NULL 

Creates a DXApplet handler for the specified remote applet.

dxidApplet ID.
projID of the project in which to access the object (if NULL, then default workspace will be used).
dx::DXApplet::DXApplet ( const std::string &  dxid,
const std::string &  proj = config::CURRENT_PROJECT() 

Creates a DXApplet handler for the specified remote applet.

dxidapplet ID
projID of the project in which the applet should be accessed
dx::DXApplet::DXApplet ( const dx::JSON &  dxlink)

Creates a DXApplet handler for the specified remote applet.

dxlinkA JSON representing a DNAnexus link. You may also use the extended form: {"$dnanexus_link": {"project": proj-id, "id": obj-id}}.

Member Function Documentation

DXApplet dx::DXApplet::clone ( const std::string &  dest_proj_id,
const std::string &  dest_folder = "/" 
) const

Clones the applet into the specified project and folder.

dest_proj_idID of the project to which the object should be cloned
dest_folderFolder route in destination project into which the clone should be placed.
New object handler with the associated project set to dest_proj_id.
void dx::DXApplet::create ( dx::JSON  inp)

Creates a new remote applet with the input hash, as specified in the /applet/new API method.

If inp["project"] is missing, then config::CURRENT_PROJECT() will be used as the destination project.

inpJSON hash representing the applet to be created
dx::JSON dx::DXApplet::get ( ) const

Returns the full specification of the applet, as specified in the /applet-xxxx/get API method.

JSON hash containing the full specification of the applet
DXJob dx::DXApplet::run ( const dx::JSON &  applet_input,
const std::string &  output_folder = "/",
const std::vector< std::string > &  depends_on = std::vector<std::string>(),
const dx::JSON &  instance_type = dx::JSON(dx::JSON_NULL),
const std::string &  project_context = config::CURRENT_PROJECT() 
) const

Runs this applet with the specified input and returns a handler for the resulting job.

See the /applet-xxxx/run API method for more info.

applet_inputA hash of name/value pairs specifying the input that the app is to be launched with.
output_folderThe folder (within the project_context) in which the applet's output objects will be placed.
depends_onA list of job IDs and/or data object IDs (string), representing jobs that must finish and/or data objects that must close before this job should start running.
instance_typeA string, or a JSON_HASH (values must be string), representing instance type on which the job with the entry point "main" will be run, or a mapping of function names to instance types. (Note: you can pass a std::map<string, string> as well)
project_contextA string representing the project context in which the applet is to be run (used only if called outside of a running job, i.e., DX_JOB_ID is not set)
Handler for the job that was launched.

The documentation for this class was generated from the following files: