|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
3 | 3 | source activate top_nf
|
4 |
| -SHORT=u,r:,f:,h,t:,c:,d,s:,u |
| 4 | +SHORT=u,r:,f:,h,t:,c:,d,s:,x |
5 | 5 | LONG=update,reads:,fastas:,help,tbdb:,cores:,dev,sp:,uninstall
|
6 | 6 | OPTS=$(getopt --options $SHORT --longoptions $LONG -- "$@")
|
7 | 7 |
|
|
29 | 29 | READS="$2"
|
30 | 30 | shift 2
|
31 | 31 | ;;
|
32 |
| - -u | --uninstall ) |
| 32 | + -x | --uninstall ) |
33 | 33 | echo "Removing TOP"
|
34 | 34 | rm ${TOPSHPATH}/TOP.sh
|
35 | 35 | conda deactivate top_nf
|
|
40 | 40 | echo "Running from fastas is not implemented yet"
|
41 | 41 | exit 2
|
42 | 42 | ;;
|
| 43 | + -u | --update ) |
| 44 | + echo "Updating The One Pipeline" |
| 45 | + wget -O ${CONDA_PREFIX}/bin/TOP.nf https://github.com/garcia-nacho/TOP/raw/master/TOP.nf |
| 46 | + wget -O ${CONDA_PREFIX}/bin/nextflow.config https://github.com/garcia-nacho/TOP/raw/master/nextflow.config |
| 47 | + wget -O ${CONDA_PREFIX}/top_template.html https://github.com/garcia-nacho/TOP/raw/master/top_template.html |
| 48 | + wget -O ${CONDA_PREFIX}/bin/TOP.sh https://github.com/garcia-nacho/TOP/raw/master/TOP.sh |
| 49 | + |
| 50 | + docker pull ghcr.io/garcia-nacho/top_spades |
| 51 | + docker pull ghcr.io/garcia-nacho/top_abricate |
| 52 | + docker pull ghcr.io/garcia-nacho/top_emmtyper |
| 53 | + docker pull ghcr.io/garcia-nacho/top_hicap |
| 54 | + docker pull ghcr.io/garcia-nacho/top_seroba |
| 55 | + docker pull ghcr.io/garcia-nacho/top_virfinder |
| 56 | + #docker pull ghcr.io/garcia-nacho/top_prokka |
| 57 | + docker pull ghcr.io/garcia-nacho/top_ngstar |
| 58 | + docker pull ghcr.io/garcia-nacho/top_tbpipeline |
| 59 | + docker pull ghcr.io/garcia-nacho/top_seqsero |
| 60 | + docker pull ghcr.io/garcia-nacho/top_ngmaster |
| 61 | + docker pull ghcr.io/garcia-nacho/top_ecoli |
| 62 | + docker pull ghcr.io/garcia-nacho/top_meningotype |
| 63 | + docker pull ghcr.io/garcia-nacho/top_tartrate |
| 64 | + exit 2 |
| 65 | + ;; |
43 | 66 | -d | --dev )
|
44 | 67 | devmode=1
|
45 | 68 | shift
|
|
54 | 77 | echo "use -f or --fastas to run from a set of fastas e.g. TOP.sh -f /path/to/fastas"
|
55 | 78 | echo "use -d or --dev to run in development mode.(i.e all files are saved after a successful run)"
|
56 | 79 | echo "use -h or --help to show this help"
|
| 80 | + echo "use -u or --update to update the pipeline" |
| 81 | + echo "use -x or --uninstall to uninstall the pipeline" |
57 | 82 | echo ""
|
58 | 83 | exit 2
|
59 | 84 | ;;
|
|
63 | 88 | ;;
|
64 | 89 | *)
|
65 | 90 | echo "Unexpected option: $1"
|
| 91 | + exit 2 |
66 | 92 | ;;
|
67 | 93 | esac
|
68 | 94 | done
|
|
0 commit comments