NIH | National Cancer Institute | NCI Wiki  

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Deleted based on 1/19 discussion.
Excerpt
hiddentrue

dm_download_dataobject_presigned

If your user account has the Read , Write, or Own permission level on a on a collection, the following command allows you to download a data file (up to 10 GB) in that collection to your local system: 

  1. If you intend to download a TAR, ZIP, or TGZ file, consider whether you want the command to extract files from that archive file. To do so, in your local system, create a JSON file that specifies the type of archive file and specifies include patterns. An example follows: 

    Code Block
    {
    	"synchronousDownloadFilter": {
    		"compressedArchiveType": "TAR",
    		"includePatterns": ["**/*file*"]
    	}
    }

    Keep in mind the following points: 

    • For the compressedArchiveType parameter, specify TAR, ZIP, or TGZ. 
    • The 10 GB limit applies to the total size of the TAR, ZIP, or TGZ file, including all of the extracted files.
    • For the includePatterns parameter, consider the following examples: 

      DescriptionExample
      One file
      Panel
      borderColorsilver
      borderStylesolid
      Clipboard
      AllowLineWraptrue

      ["Downloads/file-1.dmg"]

      Two files 
      Panel
      borderColorsilver
      borderStylesolid
      Clipboard
      AllowLineWraptrue

      ["Downloads/file-1.dmg", "Downloads/folder/file-2.txt"]

      All files that have "file" in their name, anywhere in the folder structure
      Panel
      borderColorsilver
      borderStylesolid
      Clipboard
      AllowLineWraptrue

      ["**/*file*"]

      For details, refer to Specifying Include Criteria

  2. Run the following command: 

    Panel
    borderColorsilver
    borderStylesolid
    Clipboard
    AllowLineWraptrue

    dm_download_dataobject

...

  1. [optional

...

  1. parameters]

...

  1. <source-path>

...

  1. <destination-file>


    The following table describes each parameter:

    ParameterDescription
    [-h]If you want to print a usage (help) message for this command, specify this option.
    [-D <REST-response>]

    An optional parameter, specifying a path and filename in your

...

  1. local system. The system always creates a response file:

    • If you specify this parameter, the system saves the response from the server to the specified file in the specified location.
    • If you do not specify this parameter, the system saves the file as download-dataobject-response-header.tmp in your home directory.
    [-f JSON file]An optional parameter, specifying the JSON file that specifies the type of archive file and specifies include patterns. 
    <source-path>A path within DME. Specify the data file that you want to download.
    <destination-file>A path in your

...

  1. local system. Specify where you want the system to create the downloaded file. The destination folder structure you specify must already exist.

The following example downloads a sample.txt file from the Project_Orig collection in DME to a JaneDoe folder in Windows

code
Panel
borderColorsilver
borderStylesolid
Clipboard
AllowLineWraptrue

dm_download_dataobject

_presigned

/Example_Archive/PI_Lab1/Project_Orig/sample.txt

/

cygdrive/c/Users

NCI/JaneDoe