Mercurial > repos > ebi-gxa > decoupler_pseudobulk
annotate get_test_data.sh @ 2:130e25d3ce92 draft
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 85a3118a571246d88aaad26733d0c62009cb736b
author | ebi-gxa |
---|---|
date | Fri, 13 Oct 2023 15:19:51 +0000 |
parents | 59a7f3f83aec |
children | 893ff9213a34 |
rev | line source |
---|---|
0
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
1 #!/usr/bin/env bash |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
2 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
3 BASENAME_FILE='mito_counted_anndata.h5ad' |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
4 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
5 MTX_LINK='https://zenodo.org/record/7053673/files/Mito-counted_AnnData' |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
6 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
7 # convenience for getting data |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
8 function get_data { |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
9 local link=$1 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
10 local fname=$2 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
11 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
12 if [ ! -f $fname ]; then |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
13 echo "$fname not available locally, downloading.." |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
14 wget -O $fname --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 3 $link |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
15 fi |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
16 } |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
17 |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
18 # get matrix data |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
19 mkdir -p test-data |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
20 pushd test-data |
59a7f3f83aec
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit 20f4a739092bd05106d5de170523ad61d66e41fc
ebi-gxa
parents:
diff
changeset
|
21 get_data $MTX_LINK $BASENAME_FILE |