annotate test-data.sh @ 9:7e2e9379aec7 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
author galaxyp
date Thu, 24 Sep 2020 12:12:19 +0000
parents 28e96ae21a44
children 27ddea86fe90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
1 #!/usr/bin/env bash
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
2
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
3 VERSION=2.5
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
4 FILETYPES="filetypes.txt"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
5 CONDAPKG="https://anaconda.org/bioconda/openms/2.5.0/download/linux-64/openms-2.5.0-h463af6b_1.tar.bz2"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
6
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
7 # import the magic
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
8 . ./generate-foo.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
9
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
10 # install conda
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
11 if [ -z "$tmp" ]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
12 tmp=$(mktemp -d)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
13 created="yes"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
14 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
15
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
16 export OPENMSGIT="$tmp/OpenMS$VERSION.0-git"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
17 export OPENMSPKG="$tmp/OpenMS$VERSION-pkg/"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
18 export OPENMSENV="$tmp/OpenMS$VERSION-env"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
19 export CTDCONVERTER="$tmp/CTDConverter"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
20
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
21 if [[ -z "$1" ]]; then
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
22 autotests="/dev/null"
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
23 else
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
24 autotests="$1"
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
25 fi
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
26
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
27 if type conda > /dev/null; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
28 true
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
29 else
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
30 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
31 bash Miniconda3-latest-Linux-x86_64.sh -b -p "$tmp/miniconda"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
32 source "$tmp/miniconda/bin/activate"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
33 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
34 eval "$(conda shell.bash hook)"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
35
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
36
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
37 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
38 ## get
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
39 ## - conda environment (for executing the binaries) and
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
40 ## - the git clone of OpenMS (for generating the tests)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
41 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
42
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
43 echo "Clone OpenMS $VERSION sources"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
44 if [[ ! -d $OPENMSGIT ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
45 git clone -b release/$VERSION.0 https://github.com/OpenMS/OpenMS.git $OPENMSGIT
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
46 cd $OPENMSGIT
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
47 git submodule init
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
48 git submodule update
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
49 cd -
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
50 else
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
51 cd $OPENMSGIT
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
52 git pull origin release/$VERSION.0
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
53 cd -
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
54 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
55
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
56 echo "Create OpenMS $VERSION conda env"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
57 # TODO currently add lxml (needed by CTDConverter)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
58 # TODO for some reason a to recent openjdk is used
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
59 if conda env list | grep "$OPENMSENV"; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
60 true
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
61 else
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
62 conda create -y --quiet --override-channels --channel iuc --channel conda-forge --channel bioconda --channel defaults -p $OPENMSENV openms=$VERSION openms-thirdparty=$VERSION openjdk=8.0.192 ctdopts=1.4 lxml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
63 # chmod -R u-w $OPENMSENV
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
64 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
65 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
66 ## get the
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
67 ## - conda package (for easy access and listing of the OpenMS binaries),
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
68 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
69 echo "Download OpenMS $VERSION package $CONDAPKG"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
70
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
71 if [[ ! -d $OPENMSPKG ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
72 mkdir $OPENMSPKG
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
73 wget -q -P $OPENMSPKG/ "$CONDAPKG"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
74 tar -xf $OPENMSPKG/"$(basename $CONDAPKG)" -C $OPENMSPKG/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
75 rm $OPENMSPKG/"$(basename $CONDAPKG)"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
76 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
77
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
78 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
79 ## Get python libaries for CTD -> Galaxy conversion
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
80 ## TODO fix to main repo OR conda packkage if PRs are merged
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
81 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
82 echo "Clone CTDConverter"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
83 if [[ ! -d $CTDCONVERTER ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
84 #git clone https://github.com/WorkflowConversion/CTDConverter.git CTDConverter
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
85 git clone -b topic/cdata https://github.com/bernt-matthias/CTDConverter.git $CTDCONVERTER
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
86 else
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
87 cd $CTDCONVERTER
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
88 git pull origin topic/cdata
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
89 cd -
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
90 fi
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
91 # export PYTHONPATH=$(pwd)/CTDopts
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
92
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
93 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
94 ## copy all the test data files to test-data
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
95 ## most of it (outputs) will be overwritten later, but its needed for
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
96 ## prepare_test_data
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
97 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
98 echo "Get test data"
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
99 find test-data -type f,l,d ! -name "*fa" ! -name "*loc" -delete
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
100
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
101 cp $(find $OPENMSGIT/src/tests/topp/ -type f | grep -Ev "third_party_tests.cmake|CMakeLists.txt|check_ini") test-data/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
102 cp -r $OPENMSGIT/share/OpenMS/MAPPING/ test-data/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
103 cp -r $OPENMSGIT/share/OpenMS/CHEMISTRY test-data/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
104 cp -r $OPENMSGIT/share/OpenMS/examples/ test-data/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
105 if [[ ! -f test-data/MetaboliteSpectralDB.mzML ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
106 wget -q https://abibuilder.informatik.uni-tuebingen.de/archive/openms/Tutorials/Data/latest/Example_Data/Metabolomics/databases/MetaboliteSpectralDB.mzML && mv MetaboliteSpectralDB.mzML test-data/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
107 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
108 ln -fs TOFCalibration_ref_masses test-data/TOFCalibration_ref_masses.txt
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
109 ln -fs TOFCalibration_const test-data/TOFCalibration_const.csv
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
110
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
111 if [ ! -d test-data/pepnovo_models/ ]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
112 wget http://proteomics.ucsd.edu/Software/PepNovo/PepNovo.20120423.zip
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
113 unzip -e PepNovo.20120423.zip -d /tmp/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
114 mv /tmp/Models test-data/pepnovo_models/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
115 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
116 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
117 ## generate ctd files using the binaries in the conda package
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
118 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
119 echo "Create CTD files"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
120 conda activate $OPENMSENV
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
121 mkdir -p ctd
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
122
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
123 # TODO because of https://github.com/OpenMS/OpenMS/issues/4641
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
124 # this needs to be done from within test-data
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
125 cd test-data
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
126 for i in $OPENMSPKG/bin/*
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
127 do
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
128 b=$(basename $i)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
129 echo $b
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
130 $b -write_ctd ../ctd/
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
131 sed -i -e 's/²/^2/' ../ctd/$b.ctd
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
132 done
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
133 cd -
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
134 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
135 ## fix ini files: OpenMS test data contains ini files with outdated ini files.
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
136 ## e.g. variables might be in different nodes, outdated variables present, new
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
137 ## variables missing, ...
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
138 ## OpenMS tools fix this on the fly (so its no problem for the OpenMS tests)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
139 ## but it is for the generation of the tests
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
140 ## see https://github.com/OpenMS/OpenMS/issues/4462
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
141 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
142 echo "Update test INI files"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
143 for ini in test-data/*ini
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
144 do
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
145 tool=$(cat $ini | grep 'NODE name="' | head -n 1 | sed 's/.*name="\([^"]\+\)".*/\1/')
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
146 bin=$(which $tool)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
147 if [[ -z $bin ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
148 >&2 echo "missing binary to convert $ini"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
149 continue
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
150 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
151 cp $ini $ini.backup
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
152 $bin -ini $ini -write_ini $ini > $ini.stdout 2> $ini.stderr
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
153 if [[ "$?" -ne "0" ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
154 >&2 echo "could not convert $ini"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
155 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
156 done
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
157
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
158 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
159 ## create script to create results for the tests and run it
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
160 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
161 echo "Create test shell script"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
162
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
163 echo -n "" > prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
164 echo 'export COMET_BINARY="comet"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
165 echo 'export CRUX_BINARY="crux"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
166 echo 'export FIDOCHOOSEPARAMS_BINARY="FidoChooseParameters"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
167 echo 'export FIDO_BINARY="Fido"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
168 echo 'export LUCIPHOR_BINARY="$(dirname $(realpath $(which luciphor2)))/luciphor2.jar"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
169
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
170 echo 'export MARACLUSTER_BINARY="'"$OPENMSGIT"'/THIRDPARTY/Linux/64bit/MaRaCluster/maracluster"'>> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
171 echo 'export MSFRAGGER_BINARY="/home/berntm/Downloads/MSFragger-20171106/MSFragger-20171106.jar"'>> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
172 echo 'export MSGFPLUS_BINARY="$(msgf_plus -get_jar_path)"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
173 echo 'export MYRIMATCH_BINARY="myrimatch"'>> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
174 echo 'export NOVOR_BINARY="/home/berntm/Downloads/novor/lib/novor.jar"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
175 echo 'export OMSSA_BINARY="$(dirname $(realpath $(which omssacl)))/omssacl"'>> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
176 echo 'export PERCOLATOR_BINARY="percolator"'>> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
177 echo 'export SIRIUS_BINARY="$(which sirius)"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
178 echo 'export SPECTRAST_BINARY="spectrast"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
179 echo 'export XTANDEM_BINARY="xtandem"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
180 echo 'export THERMORAWFILEPARSER_BINARY="ThermoRawFileParser.exe"' >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
181
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
182 prepare_test_data >> prepare_test_data.sh #tmp_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
183
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
184 # prepare_test_data > tmp_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
185 # # remove calls not needed for the tools listed in any .list file
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
186 # echo LIST $LIST
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
187 # if [ ! -z "$LIST" ]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
188 # REX=$(echo $LIST | sed 's/ /\n/g' | sed 's@.*/\([^/]\+\).xml$@\1@' | tr '\n' '|' | sed 's/|$//')
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
189 # else
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
190 # REX=".*"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
191 # fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
192 # echo REX $REX
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
193 # cat tmp_test_data.sh | egrep "($REX)" >> prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
194 # rm tmp_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
195
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
196 echo "Execute test shell script"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
197 chmod u+x prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
198 cd ./test-data || exit
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
199 ../prepare_test_data.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
200 cd - || exit
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
201
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
202
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
203 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
204 ## create/update test data for the manually generated tests
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
205 ## - run convert once with the manual tests only and
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
206 ## - update test-data (needs to run 2x)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
207 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
208 echo "Execute test shell script for manually curated tests"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
209 chmod u+x prepare_test_data_manual.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
210
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
211 cd ./test-data || exit
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
212 ../prepare_test_data_manual.sh
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
213 cd - || exit
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
214
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
215
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
216 ###############################################################################
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
217 ## auto generate tests
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
218 ###############################################################################
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
219 echo "Write test macros to $autotests"
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
220 echo "<macros>" > "$autotests"
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
221 for i in $(ls *xml |grep -v macros)
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
222 do
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
223 b=$(basename "$i" .xml)
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
224 get_tests2 "$b" >> "$autotests"
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
225 done
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
226 echo "</macros>" >> "$autotests"
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
227
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
228 echo "Create test data links"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
229 link_tmp_files
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
230
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
231 # tests for tools using output_prefix parameters can not be auto generated
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
232 # hence we output the tests for manual curation in macros_test.xml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
233 # and remove them from the autotests
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
234 # -> OpenSwathFileSplitter IDRipper MzMLSplitter
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
235 #
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
236 # Furthermore we remove tests for tools without binaries in conda
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
237 # -> MSFragger MaRaClusterAdapter NovorAdapter
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
238 #
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
239 # not able to specify composite test data
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
240 # -> SpectraSTSearchAdapter
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
241 if [[ ! -z "$1" ]]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
242 echo "" > macros_discarded_auto.xml
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
243 for i in OpenSwathFileSplitter IDRipper MzMLSplitter MSFraggerAdapter MaRaClusterAdapter NovorAdapter SpectraSTSearchAdapter
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
244 do
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
245 echo "<xml name=\"manutest_$i\">" >> macros_discarded_auto.xml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
246 xmlstarlet sel -t -c "/macros/xml[@name='autotest_$i']/test" macros_autotest.xml >> macros_discarded_auto.xml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
247 echo "</xml>" >> macros_discarded_auto.xml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
248 xmlstarlet ed -d "/macros/xml[@name='autotest_$i']/test" macros_autotest.xml > tmp
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
249 mv tmp macros_autotest.xml
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
250 done
9
7e2e9379aec7 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 6e8b69ee3aff3c93f745a5de11cc9169130f2e5e"
galaxyp
parents: 8
diff changeset
251 >&2 echo "discarded autogenerated macros for curation in macros_discarded_auto.xml"
8
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
252 fi
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
253 conda deactivate
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
254
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
255 ## remove broken symlinks in test-data
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
256 find test-data/ -xtype l -delete
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
257
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
258 # if [ ! -z "$created" ]; then
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
259 # echo "Removing temporary directory"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
260 # rm -rf "$tmp"
28e96ae21a44 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/openms commit 020906fb54bde7fc143c356f41975c378a741315"
galaxyp
parents:
diff changeset
261 # fi