-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathget_community_workflows.sh
More file actions
52 lines (45 loc) · 3.61 KB
/
Copy pathget_community_workflows.sh
File metadata and controls
52 lines (45 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
for com_data_fp in communities/* ; do
if [[ -d "$com_data_fp" && ! -L "$com_data_fp" ]]; then
community=`basename "$com_data_fp"`
if [[ ! -z $1 && $1 == "test" && "$community" != "microgalaxy" ]]; then
continue
fi;
if [[ "$community" != "all" && -f "communities/$community/metadata/workflow_tags" ]]; then
echo "$community";
python sources/bin/extract_galaxy_workflows.py \
filter \
--all "communities/all/resources/workflows.json" \
--filtered "communities/$community/resources/tag_filtered_workflows.json" \
--tsv-filtered "communities/$community/resources/tag_filtered_workflows.tsv" \
--tags "communities/$community/metadata/workflow_tags" \
--status "communities/$community/metadata/workflow_status.tsv"
if [[ -f "communities/$community/metadata/workflow_status.tsv" ]]; then
python sources/bin/extract_galaxy_workflows.py \
curate \
--filtered "communities/$community/resources/tag_filtered_workflows.json" \
--status "communities/$community/metadata/workflow_status.tsv" \
--curated "communities/$community/resources/curated_workflows.json" \
--tsv-curated "communities/$community/resources/curated_workflows.tsv" \
--yml "communities/$community/resources/curated_workflows.yml"
if [[ -f "communities/$community/metadata/curated_workflows.yml" ]]; then
mkdir -p _data/communities/$community/
ln -sf ../../../communities/$community/resources/curated_workflows.yml _data/communities/$community/curated_workflows.yml
#For pages - Can't copy from template, need to copy from existing md file
cp pages/microgalaxy_workflows.md pages/${community}_workflows.md
sed -i -e "s/microgalaxy/${community}/g" pages/${community}_workflows.md
#For _includes - To keep same process as above, copying from existing file
mkdir -p _includes/communities/$community/
cp _includes/communities/microgalaxy/workflows.html _includes/communities/$community/workflows.html
sed -i -e "s/microgalaxy/${community}/g" _includes/communities/$community/workflows.html
fi;
if [[ -e "communities/$community/resources/curated_workflows.tsv" ]]; then
python sources/bin/create_interactive_table.py \
--input "communities/$community/resources/curated_workflows.tsv" \
--template "sources/data/interactive_table_template.html" \
--output "communities/$community/resources/workflows.html"
fi;
fi;
fi;
fi;
done