Mercurial > repos > ebi-gxa > decoupler_pseudobulk
annotate get_test_data.sh @ 3:4fa5f370599f draft
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit c8c39f14eeee6e7a6d097fd0cb9430b12793eb8b
author | ebi-gxa |
---|---|
date | Thu, 09 Nov 2023 11:35:57 +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 |