Merge remote-tracking branch 'origin/master' into 3504-clients-compatible-with-3036
[arvados.git] / doc / user / tutorials / tutorial-keep.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: "Uploading data"
5 ...
6
7 This tutorial describes how to to upload new Arvados data collections using the command line tool @arv-put@.  This example uses 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
8
9 notextile. <div class="spaced-out">
10
11 # Begin by installing the "Arvados Python SDK":{{site.baseurl}}/sdk/python/sdk-python.html on the system from which you will upload the data (such as your workstation, or a server containing data from your sequencer).  This will install the Arvados file upload tool, @arv-put@.  Alternately, you can log into an Arvados VM (instructions for "Unix":{{site.baseurl}}/user/getting_started/ssh-access-unix.html#login or "Windows":{{site.baseurl}}/user/getting_started/ssh-access-windows.html#login).
12 # On system from which you will upload data, configure the environment with the Arvados instance host name and authentication token as decribed in "Getting an API token.":{{site.baseurl}}/user/reference/api-tokens.html  (If you are logged into an Arvados VM, you can skip this step.)
13 # Download the following example file.  (If you are uploading your own data, you can skip this step.)
14 <notextile>
15 <pre><code>~$ <span class="userinput">curl -o var-GS000016015-ASM.tsv.bz2 'https://warehouse.pgp-hms.org/warehouse/f815ec01d5d2f11cb12874ab2ed50daa+234+K@ant/var-GS000016015-ASM.tsv.bz2'</span>
16   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
17                                  Dload  Upload   Total   Spent    Left  Speed
18 100  216M  100  216M    0     0  10.0M      0  0:00:21  0:00:21 --:--:-- 9361k
19 </code></pre>
20 </notextile>
21 # Now upload the file to Keep using @arv-put@:
22 <notextile>
23 <pre><code>~$ <span class="userinput">arv-put var-GS000016015-ASM.tsv.bz2</span>
24 216M / 216M 100.0%
25 c1bad4b39ca5a924e481008009d94e32+210
26 </code></pre>
27 </notextile>
28
29 * The output value @c1bad4b39ca5a924e481008009d94e32+210@ is the Arvados collection locator that uniquely describes this file.
30
31 Now visit the Workbench *Dashboard*.  In the *My projects* pane, select your *Home* project.  Your newly uploaded collection should appear near the top of the *Data collections* tab.  The collection locator printed by @arv-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*.
32
33 !{{ site.baseurl }}/images/workbench-move-selected.png!
34
35 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.
36
37 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.
38
39 notextile. </div>
40
41 h2(#dir). Putting a directory
42
43 If you give @arv-put@ a directory, it will recursively upload the entire directory:
44
45 <notextile>
46 <pre><code>~$ <span class="userinput">mkdir tmp</span>
47 ~$ <span class="userinput">echo "hello alice" > tmp/alice.txt</span>
48 ~$ <span class="userinput">echo "hello bob" > tmp/bob.txt</span>
49 ~$ <span class="userinput">echo "hello carol" > tmp/carol.txt</span>
50 ~$ <span class="userinput">arv-put tmp</span>
51 0M / 0M 100.0%
52 887cd41e9c613463eab2f0d885c6dd96+83
53 </code></pre>
54 </notextile>