--- layout: default navsection: userguide title: "Uploading data" ... This tutorial describes how to to upload new Arvados data collections using the command line tool @arv keep put@. notextile.
{% include 'tutorial_expectations' %} h2. Upload using command prompt To upload a file to Keep using @arv keep put@:
~$ arv keep put var-GS000016015-ASM.tsv.bz2
216M / 216M 100.0%
Collection saved as ...
qr1hi-4zz18-xxxxxxxxxxxxxxx
The output value @qr1hi-4zz18-xxxxxxxxxxxxxxx@ is the uuid of the Arvados collection created. The file used in this example is a freely available TSV file containing variant annotations from "Personal Genome Project (PGP)":http://www.pgp-hms.org participant "hu599905.":https://my.pgp-hms.org/profile/hu599905), downloadable "here":https://warehouse.pgp-hms.org/warehouse/f815ec01d5d2f11cb12874ab2ed50daa+234+K@ant/var-GS000016015-ASM.tsv.bz2. It is also possible to upload an entire directory with @arv keep put@:
~$ mkdir tmp
~$ echo "hello alice" > tmp/alice.txt
~$ echo "hello bob" > tmp/bob.txt
~$ echo "hello carol" > tmp/carol.txt
~$ arv keep put tmp
0M / 0M 100.0%
Collection saved as ...
qr1hi-4zz18-yyyyyyyyyyyyyyy
In both examples, the @arv keep put@ command created a collection. The first collection contains the single uploaded file. The second collection contains the entire uploaded directory. @arv keep put@ accepts quite a few optional command line arguments, which are described on the "arv subcommands":{{site.baseurl}}/sdk/cli/subcommands.html#arv-keep-put page. h3. Locate your collection in Workbench Visit the Workbench *Dashboard*. Click on *Projects* dropdown menu in the top navigation menu, select your *Home* project. Your newly uploaded collection should appear near the top of the *Data collections* tab. The collection locator printed by @arv keep put@ will appear under the *name* column. To move the collection to a different project, check the box at the left of the collection row. Pull down the *Selection...* menu near the top of the page tab, and select *Move selected*. This will open a dialog box where you can select a destination project for the collection. Click a project, then finally the Move button. !{{ site.baseurl }}/images/workbench-move-selected.png! Click on the * Show* button next to the collection's listing on a project page to go to the Workbench page for your collection. On this page, you can see the collection's contents, download individual files, and set sharing options. notextile.
h2. Upload using Workbench To upload using Workbench, visit the Workbench *Dashboard*. Click on *Projects* dropdown menu in the top navigation menu and select your *Home* project or any other project of your choosing. You will see the *Data collections* tab for this project, which lists the collections in this project. To upload a file, click on *Add data* dropdown menu and select *Upload files from my computer*. !{{ site.baseurl }}/images/upload-using-workbench.png!
This will create a new empty collection in your chosen project and will take you to the *Upload* tab for that collection. !{{ site.baseurl }}/images/upload-tab-in-new-collection.png! Click on the *Browse...* button and select the files you would like to upload. You can select multiple files. You will be able to click on the "Browse..." button multiple times and select files. After you are done selecting files to upload, click on the * Start* button to start upload. This will start uploading files to Arvados and Workbench will show you the progress bar. When upload is completed, you will see an indication to that effect. !{{ site.baseurl }}/images/files-uploaded.png! *Note:* If you were to leave the collection page during the upload, the upload action will be aborted and you would need to upload again. *Note:* You will be able to use the *Add data* dropdown menu to add additional files to a previously collection as well.