Skip to content

Commit 95e1f70

Browse files
committed
added missing script
1 parent d1bcb32 commit 95e1f70

File tree

1 file changed

+24
-0
lines changed
  • Amplicon/Illumina/Workflow_Documentation/NF_AmpIllumina/workflow_code/bin

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
# only built for use on N288 cluster
5+
6+
# example usage: bash clean-paths.sh <input-file> <workflow-dir>
7+
8+
# making sure by chance we are not overwriting a wanted file called 't'
9+
10+
if [ -s t ]; then
11+
printf "\n This simple program temporarily writes to a file called 't'\n"
12+
printf " Since that exists already here, we are not going to continue.\n\n"
13+
exit
14+
fi
15+
16+
17+
ROOT_DIR=$(echo $2 | awk '{N=split($0,a,"/"); for(i=0; i < N-1; i++) printf "%s/", a[i]}' | sed 's|//|/|')
18+
19+
20+
sed -E 's|.*/GLDS_Datasets/(.+)|\1|g' ${1} \
21+
| sed -E 's|.+/miniconda.+/envs/[^/]*/||g' \
22+
| sed -E 's|/[^ ]*/GLDS-|GLDS-|g' \
23+
| sed -E 's|/[a-z]{6}/[^ ]*|<path-removed-for-security-purposes>|g' \
24+
| sed -E "s|${ROOT_DIR}||g" > t && mv t ${1}

0 commit comments

Comments
 (0)