21700: Install Bundler system-wide in Rails postinst
[arvados.git] / doc / user / tutorials / tutorial-keep.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Uploading data"
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 Arvados Data collections can be uploaded using either Workbench or the @arv-put@ command line tool.
13
14 # "*Upload using Workbench*":#upload-using-workbench
15 # "*Upload using command line tool*":#upload-using-command
16
17 h2(#upload-using-workbench). Upload using Workbench
18
19 To upload using Workbench, first identify the project to upload the files into. This is done by browsing your projects in the navigation menu on the left, or to search for the project using the search field on the top.
20
21 Having navigated to the project, click on the <span class="btn btn-sm btn-primary">+ NEW</span> button in the top-left corner. In the pop-up menu, select the item *New collection*.
22
23 <figure> !{width: 80%;}{{ site.baseurl }}/images/add-new-collection-wb2.png! <figcaption> _Creating a new collection in the project "WGS Processing Tutorial"_ </figcaption></figure>
24
25 In the dialog box that follows, you will be prompted to create a new collection in your chosen project. Here, the *Collection Name* field is required. After entering the name for this new collection (and optionally other fields), you have the choice to create it with new file updates -- by drag-and-drop into the *Files* area or with the traditional file-upload dialog opened by your browser.
26
27 <figure>!{width: 100%;}{{ site.baseurl }}/images/new-collection-modal-wb2.png!<figcaption>_Providing the new collection with a name (required). Optionally, you can upload files in this step._</figcaption></figure>
28
29 You can then click on the <span class="btn btn-sm btn-primary">CREATE A COLLECTION</span> button and proceed to the newly-created collection's page. If you don't upload any data when creating the collection, the new collection will be empty, and you can upload files into it later.
30
31 <figure>!{width: 100%;}{{ site.baseurl }}/images/newly-created-collection-empty-wb2.png!<figcaption>_The newly-created collection without any files yet._</figcaption></figure>
32
33 In the <span class="btn btn-sm btn-primary">FILES</span> panel, there is a button labeled <span class="btn btn-sm btn-primary">UPLOAD DATA</span>. Click on it, and you will be prompted to upload files by drag-and-drop or the file-selection dialog opened by your browser.
34
35 The files you choose to upload will then be displayed, and you can review them before clicking on the <span class="btn btn-sm btn-primary">UPLOAD DATA</span> button to initiate the actual file transfer.
36
37 <figure>!{width: 100%;}{{ site.baseurl }}/images/upload-data-prompt-with-files-wb2.png!<figcaption>_Selecting the files to upload_</figcaption></figure>
38
39 Once the file upload completes, you will be notified by a message, and the files will appear under the <span class="btn btn-sm btn-primary">FILES</span> panel shortly.
40
41 <figure>!{width: 100%;}{{ site.baseurl }}/images/upload-data-progress-wb2.png!<figcaption>_Upload status being displayed, with the files to appear shortly_</figcaption></figure>
42
43 *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.
44
45 *Note:* You can also use the <span class="btn btn-sm btn-primary">UPLOAD DATA</span> button to add additional files to an existing collection.
46
47 notextile. <div class="spaced-out">
48
49
50 h2(#upload-using-command). Upload using command line tool
51
52 {% include 'tutorial_expectations' %}
53
54 To upload a file to Keep using @arv-put@:
55 <notextile>
56 <pre><code>~$ <span class="userinput">arv-put var-GS000016015-ASM.tsv.bz2</span>
57 216M / 216M 100.0%
58 Collection saved as ...
59 zzzzz-4zz18-xxxxxxxxxxxxxxx
60 </code></pre>
61 </notextile>
62
63
64 The output value @zzzzz-4zz18-xxxxxxxxxxxxxxx@ is the uuid of the Arvados collection created.
65
66 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
67
68 <notextile><a name="dir"></a></notextile>It is also possible to upload an entire directory with @arv-put@:
69
70 <notextile>
71 <pre><code>~$ <span class="userinput">mkdir tmp</span>
72 ~$ <span class="userinput">echo "hello alice" > tmp/alice.txt</span>
73 ~$ <span class="userinput">echo "hello bob" > tmp/bob.txt</span>
74 ~$ <span class="userinput">echo "hello carol" > tmp/carol.txt</span>
75 ~$ <span class="userinput">arv-put tmp</span>
76 0M / 0M 100.0%
77 Collection saved as ...
78 zzzzz-4zz18-yyyyyyyyyyyyyyy
79 </code></pre>
80 </notextile>
81
82 In both examples, the @arv-put@ command created a collection. The first collection contains the single uploaded file. The second collection contains the entire uploaded directory.
83
84 @arv-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.
85
86 h3. Locate your collection in Workbench
87
88 Visit the Workbench and go to your <i class="fa fa-fw fa-folder"></i> *Home Projects*.  Your newly uploaded collection should appear in the main panel.  The collection name printed by @arv-put@ will appear under the *Name* column, and its *Type* will be "_Data collection_".
89
90 Click on the collection's name will lead you to its Workbench page, where you can see the collection's contents and download individual files.
91
92 To move the collection to a different project, locate the collection and right-click on it. This will bring up a context menu with *Move to*. Click on this item, and you will see a dialog box where you can select the target project to move this collection to, by search or navigation. This context menu is also available from the triple-dot button in the project/collection listing or the collection details page.
93
94 <figure>!{width: 80%;}{{ site.baseurl }}/images/workbench-move-wb2.png!<figcaption> _Context menu with the_ *Move to* _item_ </figcaption></figure>
95
96 notextile. </div>