Organizing Data

Creating and removing folders

You can use the dx mkdir and dx rmdir commands to create new folders and remove empty folders.

Moving an object or folder

You can use the dx mv command to move objects or folders within the same project. It behaves much like the UNIX mv command and can be used to move multiple objects or folders to a single folder, or to rename an existing object or folder if the destination path does not exist. Note however that the parent folder for the destination path must exist, or there will be an error.

Examples:

$ dx mv foo.txt bar.txt   # Renames foo.txt to bar.txt
$ dx mv foo.txt /bar/baz  # Moves the file foo.txt to the folder /bar/baz
$ dx mv bar.txt ..        # Moves the file bar.txt to the parent folder
$ dx mv /bar/baz /baz     # Moves the folder /bar/baz into the root; note that this will
                          # throw an error if there is already a folder named "baz" in the root folder

Copying data between projects

You may copy data between projects with the dx cp command. Multiple objects and folders can be copied at a time.

$ dx cp foo.txt Mouse\ Project:foo-txt-files/ $ dx cp foo.txt bar.txt folder/path/ Other\ Project:Incoming/ $ dx ls Other\ Project:Incoming path/ bar.txt foo.txt

Searching for and importing data from other projects

You can search for data within your project as well as between your different projects using the dx find data command.

To search within all the projects you have access to (excluding public projects), you can use the --all-projects flag. The following search will search for all files with the tag 'human' with the word 'tumor' in the name.

$ dx find data --all-projects --name "*tumor*" --tag human closed 2012-06-27 18:04:28 /Sample0/tumor_sample_0.bam (project-BVJv45Q02abcdQ81p1vk0zqq:file-9zbpq72y8x6F0xPzKZB00003) closed 2012-06-27 15:34:00 /Sample1/tumor_sample_1.bam (project-DBQv34U47epzcP21p4sk3axp:file-BQf7xv00b23p7JJVX0vQgZX3)

You can then copy your files to your current project by using the dx cp command with the project ID and file path or by specifying the project ID and file ID.

$ dx cp project-BVJv45Q02abcdQ81p1vk0zqq:/Sample0/tumor_sample_0.bam . $ dx cp project-DBQv34U47epzcP21p4sk3axp:file-BQf7xv00b23p7JJVX0vQgZX3 . $ dx ls tumor_sample_0.bam tumor_sample_1.bam ...
TIP: The --brief flag will result in one data object ID printed for each result, one per line.

For more information on the flags available for searching, visit the Index of dx Commands page or type dx find data --help into your command line.

Last edited by Thanh-Ha Nguyen (tnguyen), 2014-11-21 17:46:56

 Feedback