8784: Fix test for latest firefox.
[arvados.git] / doc / user / tutorials / tutorial-keep.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Uploading data"
5 ...
6
7 Arvados Data collections can be uploaded using either the @arv keep put@ command line tool or using Workbench.
8
9 # "*Upload using command line tool*":#upload-using-command
10 # "*Upload using Workbench*":#upload-using-workbench
11
12 notextile. <div class="spaced-out">
13
14 h2(#upload-using-command). Upload using command line tool
15
16 {% include 'tutorial_expectations' %}
17
18 To upload a file to Keep using @arv keep put@:
19 <notextile>
20 <pre><code>~$ <span class="userinput">arv keep put var-GS000016015-ASM.tsv.bz2</span>
21 216M / 216M 100.0%
22 Collection saved as ...
23 qr1hi-4zz18-xxxxxxxxxxxxxxx
24 </code></pre>
25 </notextile>
26
27
28 The output value @qr1hi-4zz18-xxxxxxxxxxxxxxx@ is the uuid of the Arvados collection created.
29
30 Note: The file used in this example is a freely available TSV file containing variant annotations from the "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. Alternatively, you can replace @var-GS000016015-ASM.tsv.bz2@ with the name of any file you have locally, or you could get the TSV file by "downloading it from Keep.":{{site.baseurl}}/user/tutorials/tutorial-keep-get.html
31
32 <notextile><a name="dir"></a></notextile>It is also possible to upload an entire directory with @arv keep put@:
33
34 <notextile>
35 <pre><code>~$ <span class="userinput">mkdir tmp</span>
36 ~$ <span class="userinput">echo "hello alice" > tmp/alice.txt</span>
37 ~$ <span class="userinput">echo "hello bob" > tmp/bob.txt</span>
38 ~$ <span class="userinput">echo "hello carol" > tmp/carol.txt</span>
39 ~$ <span class="userinput">arv keep put tmp</span>
40 0M / 0M 100.0%
41 Collection saved as ...
42 qr1hi-4zz18-yyyyyyyyyyyyyyy
43 </code></pre>
44 </notextile>
45
46 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.
47
48 @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.
49
50 h3. Locate your collection in Workbench
51
52 Visit the Workbench *Dashboard*.  Click on *Projects*<span class="caret"></span> 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 name printed by @arv keep put@ will appear under the *name* column.
53
54 To move the collection to a different project, check the box at the left of the collection row.  Pull down the *Selection...*<span class="caret"></span> menu near the top of the page tab, and select *Move selected...* button. This will open a dialog box where you can select a destination project for the collection.  Click a project, then finally the <span class="btn btn-sm btn-primary">Move</span> button.
55
56 !{display: block;margin-left: 25px;margin-right: auto;}{{ site.baseurl }}/images/workbench-move-selected.png!
57
58 Click on the *<i class="fa fa-fw fa-archive"></i> 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.
59
60 notextile. </div>
61
62 h2(#upload-using-workbench). Upload using Workbench
63
64 To upload using Workbench, visit the Workbench *Dashboard*. Click on *Projects*<span class="caret"></span> 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.
65
66 To upload files into a new collection, click on *Add data*<span class="caret"></span> dropdown menu and select *Upload files from my computer*.
67
68 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-using-workbench.png!
69
70 <br/>This will create a new empty collection in your chosen project and will take you to the *Upload* tab for that collection.
71
72 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/upload-tab-in-new-collection.png!
73
74 Click on the *Browse...* button and select the files you would like to upload. Selected files will be added to a list of files to be uploaded. After you are done selecting files to upload, click on the *<i class="fa fa-fw fa-play"></i> 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.
75
76 !{display: block;margin-left: 25px;margin-right: auto;border:1px solid lightgray;}{{ site.baseurl }}/images/files-uploaded.png!
77
78 *Note:* If you leave the collection page during the upload, the upload process will be aborted and you will need to upload the files again.
79
80 *Note:* You can also use the Upload tab to add additional files to an existing collection.