2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
9 echo "$0: Copies Arvados tutorial resources from public data cluster (jutro)"
10 echo "Usage: copy-tutorial.sh <tutorial>"
11 echo "<tutorial> is which tutorial to copy, one of:"
12 echo " bwa-mem Tutorial from https://doc.arvados.org/user/tutorials/tutorial-workflow-workbench.html"
13 echo " whole-genome Whole genome variant calling tutorial workflow (large)"
17 if test -z "ARVADOS_API_HOST" ; then
18 echo "Please set ARVADOS_API_HOST to the destination cluster"
25 if ! test -f $HOME/.config/arvados/jutro.conf ; then
26 # Set it up with the anonymous user token.
27 echo "ARVADOS_API_HOST=jutro.arvadosapi.com" > $HOME/.config/arvados/jutro.conf
28 echo "ARVADOS_API_TOKEN=v2/jutro-gj3su-e2o9x84aeg7q005/22idg1m3zna4qe4id3n0b9aw86t72jdw8qu1zj45aboh1mm4ej" >> $HOME/.config/arvados/jutro.conf
33 echo "Copying from public data cluster (jutro) to $ARVADOS_API_HOST"
39 if test -z "$owner" ; then
40 owner=$(arv --format=uuid user current)
42 project_uuid=$(arv --format=uuid group list --filters '[["name", "=", "'"$name"'"], ["owner_uuid", "=", "'$owner'"]]')
43 if test -z "$project_uuid" ; then
44 project_uuid=$(arv --format=uuid group create --group '{"name":"'"$name"'", "group_class": "project", "owner_uuid": "'$owner'"}')
51 if ! arv-keepdocker | grep "arvados/jobs *latest" ; then
52 arv-copy --project-uuid=$parent_project jutro-4zz18-sxmit0qs6i9n2s4
56 parent_project=$(make_project "Tutorial projects")
59 if test "$tutorial" = "bwa-mem" ; then
61 echo "Copying bwa mem tutorial"
64 arv-copy --project-uuid=$parent_project jutro-j7d0g-rehmt1w5v2p2drp
67 echo "Finished, data copied to \"User guide resources\" at $parent_project"
68 echo "You can now go to Workbench and choose 'Run a process' and then select 'bwa-mem.cwl'"
72 if test "$tutorial" = "whole-genome" ; then
74 echo "Copying whole genome variant calling tutorial"
77 arv-copy --project-uuid=$parent_project jutro-j7d0g-n2g87m02rsl4cx2
80 echo "Finished, data copied to \"WGS Processing Tutorial\" at $parent_project"
81 echo "You can now go to Workbench and choose 'Run a process' and then select 'WGS Processing Tutorial'"